I am developing an application where I have a common problem of taking an input of some type and applying a chain of transformations to it to get an output.
For example, I take an image in the form of cv::Mat
as input, apply a functor to it to get a bunch of local features in the form of std::vector<Eigen::VectorXf>
which are then converted to a global descriptor in the form of a single Eigen::VectorXf
. This is just an example, an actual chain of processing might be a lot longer.
I am trying to come up with a sensible way of representing this. I am currently thinking of a sort of linked list of operations, where each operation calls the next operation unless its next
field is empty.
Is this the sensible way of going forward? Is there a design pattern that is meant for this situation?
Aucun commentaire:
Enregistrer un commentaire