Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a single pipe for multiple data #66

Open
omeijer opened this issue Feb 27, 2021 · 0 comments
Open

Create a single pipe for multiple data #66

omeijer opened this issue Feb 27, 2021 · 0 comments

Comments

@omeijer
Copy link

omeijer commented Feb 27, 2021

I'm trying to produce a pipeline that will operate on multiple data sets.
For example I have a container that contains two vectors. One for rectangles and one for trapezoids.

I can now create a pipeline that operates on just the rectangles and another to operates on the trapezoids.
This method will work but the pipeline needs to be coded twice with the risk of errors.

Would it be possible to define the pipeline just once but iterate over each of the individual entries of both vectors.
So conceptualy something like this:
`
struct Container
{
std::vector rects;
std:vector traps;
};

Container inputs;
Container output;
inputs >>= pipes::transform(scale)
>>= pipes::transform(mirror)
>>= pipes::transform(clip)
>>= pipes::push_back(output);
`
It would also be very nice if the pipeline could change over from one shape type to another.
For example a trapezoid could morph into a rectangle after a certain operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant