I have a derived type I have defined as a "trialvariable". It contains an
integer position, a character label, and a real value. Its purpose is to
represent optimization trial variables. I have it set up in a "class" in a
module.
One of the ideas is that when two arrays of trial variables are present and
I assign one to the other, the assignment is smart; i.e it matches based on
the label of the trial variable. This works great if both arrays of trial
variables have been initialized; but I realize I have no way now of just
overwriting the contents of a trial variable now because "=" is overloaded.
I was considering calling the smart assignment a different name; i.e. not
overloading it into the "=".
Has anyone run into this before, i.e. assigning based on matching criteria?
Does this operation have a technical name, like gather or scatter operations
have their own names?
Alvaro Fernández
|