Programming Reference:LinearCombination: Difference between revisions
Created page with "==Function== Similar to <tt>ParallelCombination</tt>, the <tt>LinearCombination</tt> 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: #include "FilterCombination.h" #include "Filter1.h" #include "Filter2.h" struct MyCombination : LinearC..." |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 13: | Line 13: | ||
The resulting filter will apply existing filters <tt>Filter1</tt> and <tt>Filter2</tt> in sequence, such that the <tt>LinearCombination's</tt> input will be the input of <tt>Filter1</tt>, and its output will we the output of <tt>Filter2</tt>. | The resulting filter will apply existing filters <tt>Filter1</tt> and <tt>Filter2</tt> in sequence, such that the <tt>LinearCombination's</tt> input will be the input of <tt>Filter1</tt>, and its output will we the output of <tt>Filter2</tt>. | ||
'''NOTE:''' Due to existence of the [[Programming Reference:SubchainFilter|SubchainFilter]], the <tt>LinearCombination</tt> class is largely obsolete. | '''NOTE:''' Due to existence of the more general [[Programming Reference:SubchainFilter|SubchainFilter]], the <tt>LinearCombination</tt> class is largely obsolete. | ||
==Parameters== | ==Parameters== | ||
| Line 22: | Line 22: | ||
==See also== | ==See also== | ||
[[Programming Reference: | [[Programming Reference:ParallelCombination]], [[Programming Reference:SubchainFilter]], [[Programming Reference:ChoiceCombination]] | ||
[[Category:Filters]][[Category:Signal Processing]][[Category:Filter Combinations]] | [[Category:Filters]][[Category:Signal Processing]][[Category:Filter Combinations]] | ||
Latest revision as of 14:58, 7 September 2023
Function
Similar to ParallelCombination, the LinearCombination 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:
#include "FilterCombination.h"
#include "Filter1.h"
#include "Filter2.h"
struct MyCombination : LinearCombination<Filter1, Filter2> {};
The instantiated LinearCombination template may then be referred to as a filter with name MyCombination.
The resulting filter will apply existing filters Filter1 and Filter2 in sequence, such that the LinearCombination's input will be the input of Filter1, and its output will we the output of Filter2.
NOTE: Due to existence of the more general SubchainFilter, the LinearCombination class is largely obsolete.
Parameters
None.
States
None.
See also
Programming Reference:ParallelCombination, Programming Reference:SubchainFilter, Programming Reference:ChoiceCombination