Programming Reference:ParallelCombination: Difference between revisions
Created page with "==Function== The ParallelCombination class is a template that takes as arguments two filter class names. The instantiated template is then a combined filter, and must be given its own class name by defining a struct that publicly inherits from the instantiated template: struct MyCombination : ParallelCombination<Filter1, Filter2> {} *The combination's ''input'' channels may be fed selectively into the inputs of the two filters. *The combination's ''output'' is joined..." |
|||
| Line 16: | Line 16: | ||
The parameter is matrix-valued, and contains only a single column with two entries. | The parameter is matrix-valued, and contains only a single column with two entries. | ||
The two rows correspond to the two filters given as template arguments, and each row's label gives the name of the filter it corresponds to. | The two rows correspond to the two filters given as template arguments, and each row's label gives the name of the filter it corresponds to. | ||
Matrix elements themselves contain a list of channels each, determing which channels are transmitted to which of the two subfilters, or chains. | Matrix elements themselves contain a list of channels each, determing which channels are transmitted to which of the two subfilters, or chains. | ||
Ranges of channels may be specified using : or - to separate begin from end. | For channel lists, the following rules apply: | ||
* Entries are separated by white space. | |||
* Entries may contain wildcards: * to represent one or more arbitrary characters, and ? to represent a single arbitrary character. | |||
* Character ranges may be enclosed by []. | |||
* Wildcard patterns may be negated by prepending an exclamation mark. | |||
* Ranges of channels may be specified using : or - to separate begin from end. | |||
Revision as of 15:16, 5 September 2023
Function
The ParallelCombination class is a template that takes as arguments two filter class names. The instantiated template is then a combined filter, and must be given its own class name by defining a struct that publicly inherits from the instantiated template:
struct MyCombination : ParallelCombination<Filter1, Filter2> {}
- The combination's input channels may be fed selectively into the inputs of the two filters.
- The combination's output is joined together from the output of the two filters.
Any of the two filters may be a SubchainFilter, which allows for two parallel chains of filters, as well as more complex topologies because SubchainFilters may again contain ParallelCombination instantiations.
Parameters
<FilterName>Channels
The name of this parameter depends on the class name given to the instantiated combination as described under "Function", or the name given to the filter programmatically. In the example above, the parameter's name will be MyCombinationChannels.
The parameter is matrix-valued, and contains only a single column with two entries. The two rows correspond to the two filters given as template arguments, and each row's label gives the name of the filter it corresponds to.
Matrix elements themselves contain a list of channels each, determing which channels are transmitted to which of the two subfilters, or chains.
For channel lists, the following rules apply:
- Entries are separated by white space.
- Entries may contain wildcards: * to represent one or more arbitrary characters, and ? to represent a single arbitrary character.
- Character ranges may be enclosed by [].
- Wildcard patterns may be negated by prepending an exclamation mark.
- Ranges of channels may be specified using : or - to separate begin from end.