Closed gijzelaerr closed 10 years ago
Original comment thread migrated from bugzilla
CompoundFunctions currently have their flag mask disabled completely (it wouldn't work properly previously due to sizing issues). Fix this!!!
Lots of nodes now need to operate on tensor results, with some specific tensor layout implied or expected. (E.g. UVW, LMN, AzEl, the future MeqFunctional). All these need to handle perturbed values in some consistent way, a-la the MeqFunction class, but extended to tensors. Therefore I volunteer to rework CompoundFunction into a TensorFunction class, which provides a base for evaluating a tensor function with tensor arguments. The crux of it is the method:
virtual void evaluate (std::vector<Vells > &out, const Request &req,const LoShape &shape, const std::vector< std::vector<const Vells> > &in);
Here in[child_number][vellset_number] gives the set of input Vells, and out[i] gives the Nth output vells. The business of evaluate() is to compute the function of the inputs and store it in out[]. TensorFunction::getResult() will then take care of iterating over all spids in the child results, and calling evaluate() for each combination of spids.
A similar virtual method to handle flags will be provided.
Done, see MEQ/TensorFunction.{cc,h}
LMN and VisPhaseShift are two good examples of how to use this class, I have not converted the other noes over yet.
at 2005-09-22 16:10:31 Oleg Smirnov reported:
Rework CompoundFunction into a TensorFunction