Element Split Filter
Element Split Filter
ElementSplitFilter.png
Description Splits elements up across multiple elements.
Threaded No
Memory Usage Heavy
Stream Support Yes
Added In 0.2.3

Element Split Filter

The element split filter is useful when you are reading from a file that is in a slightly different format than what you want. It will take a single element from the input and break it up across multiple elements in the output according to the settings you choose. The figure below shows a sample instance of this filter.

ElementSplitFilter.png

The first option allows you to specify if you want to work with parameters or values. For the rest of the discussion the term value will be used, but if you have this checked you should replace it with parameter.

The start index tells the filter the index of the first value that you want to turn into a new element. After that you specify how many values you want to put inside of each element. Next is how many elements to create in the output from each input element. The stride in element setting tells the filter how far to advance the index for each subsequent value in an element. The step between elements is an amount to increment the start index for each new element that is created. Lastly, you can add "take" formulas. Each one of these will be evaluated and the value stored in each new element. This gives you a way of mapping back to the element that a particular output was created from. The "take" values come before everything else.

To give a quick example to demonstrate the use of step and stride, assume that you have an input that has elements that have 6 value, v[0]-v[5]. If you want to break that up so that you get one element with v[0]-v[1], another with v[2]-v[3], and a last one with v[4]-v[5] you would make the start index=0, number in element=2, number of elements=3, stride=1, and step=2. On the other hand, if you wanted the input values to alternate between output elements so that one element would have v[0], v[2], and v[4] while the next had v[1], v[3], and v[5], you would change the number in element=3, number of elements=2, stride=2, step=1.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License