/**
 * \page BoxAlgorithm_SimpleDSP Simple DSP
__________________________________________________________________

Detailed description
__________________________________________________________________

 * |OVP_DocBegin_BoxAlgorithm_SimpleDSP_Description|
 * This plugin is used to apply a mathematical formulae to each sample of an incoming signal and output
 * the resulting signal. It thus acts as a simple DSP.
 *
 * The author may add up to 15 additional inputs.
 * In such circumstances, each input would be identified
 * by a letter from \e A to \e P.
 *
 * Also the type of the inputs could be changed to any
 * streamed matrix derived type. Thus you can process
 * signal, spectrum or feature vector if you need.
 * |OVP_DocEnd_BoxAlgorithm_SimpleDSP_Description|
__________________________________________________________________

Inputs description
__________________________________________________________________

 * |OVP_DocBegin_BoxAlgorithm_SimpleDSP_Inputs|
 You can use from 1 to 16 inputs.
 * |OVP_DocEnd_BoxAlgorithm_SimpleDSP_Inputs|

 * |OVP_DocBegin_BoxAlgorithm_SimpleDSP_Input1|
 * Input signal
 * |OVP_DocEnd_BoxAlgorithm_SimpleDSP_Input1|
__________________________________________________________________

Outputs description
__________________________________________________________________

 * |OVP_DocBegin_BoxAlgorithm_SimpleDSP_Outputs|
 * |OVP_DocEnd_BoxAlgorithm_SimpleDSP_Outputs|

 * |OVP_DocBegin_BoxAlgorithm_SimpleDSP_Output1|
 * Filtered signal.
 * |OVP_DocEnd_BoxAlgorithm_SimpleDSP_Output1|
__________________________________________________________________

Settings description
__________________________________________________________________

 * |OVP_DocBegin_BoxAlgorithm_SimpleDSP_Settings|
 * |OVP_DocEnd_BoxAlgorithm_SimpleDSP_Settings|

 * |OVP_DocBegin_BoxAlgorithm_SimpleDSP_Setting1|
 * Formula to apply to incoming data (identified as 'X'). See \ref Doc_BoxAlgorithm_SimpleDSP_Miscellaneous for more details.
 * |OVP_DocEnd_BoxAlgorithm_SimpleDSP_Setting1|
__________________________________________________________________

Examples description
__________________________________________________________________

 * |OVP_DocBegin_BoxAlgorithm_SimpleDSP_Examples|
 * Let's consider that we want to compute the natural logarithm of the absolute value
 * of the input signal plus one. We just have to type the equation like that :
 * \code
 * log(abs(X) + 1)
 * \endcode
 *
 * Another example : if you want to sum the cosinus of X minus Pi with its sinus plus Pi,
 * you can enter this equation :
 * \code
 * cos(X - M_PI) + sin(X + M_PI)
 * \endcode
 * |OVP_DocEnd_BoxAlgorithm_SimpleDSP_Examples|

__________________________________________________________________

Miscellaneous description
__________________________________________________________________

 * |OVP_DocBegin_BoxAlgorithm_SimpleDSP_Miscellaneous|
 * The equation can use at most 16 variables, for 16 input signals.
 * The variable names are the 16 first letters of the alphabet, i.e. 'a' (or 'A') to 'p' (or 'P') matches inputs 1 to 16.
 * \b NB : The first input variable can be named 'x' or 'X'.
 *
 * Here is a list of supported functions/operators :
 *
 * - Operators
 *  - +
 *  - -
 *  - *
 *  - /
 *
 * - Unary functions
 *  - abs
 *  - acos
 *  - asin
 *  - atan
 *  - ceil
 *  - cos
 *  - exp
 *  - floor
 *  - log
 *  - log10
 *  - sin
 *  - sqrt
 *  - tan
 *
 * - Binary function
 *  - pow
 *
 * - Comparison operators
 *  - >
 *  - >=
 *  - <
 *  - <=
 *  - ==
 *  - = (equivalent to ==)
 *  - !=
 *  - <> (equivalent to !=)
 *
 * - Boolean operators
 *  - & as \e and
 *  - && also as \e and
 *  - | as \e or
 *  - || also as \e or
 *  - ! as \e not
 *  - ~ as \e xor
 *  - ^ also as \e xor
 *
 * - ternary operator
 *  - ? :
 *
 * There are also a few defined constants :
 *
 * - M_PI
 * - M_PI_2
 * - M_PI_4
 * - M_1_PI
 * - M_2_PI
 * - M_2_SQRTPI
 * - M_SQRT2
 * - M_SQRT1_2
 * - M_E
 * - M_LOG2E
 * - M_LOG10E
 * - M_LN2
 * - M_LN10
 *
 * (note : their meaning is the same as the constants of the same name in math.c)
 *
 * Furthermore, the equation parser is totally case-insensitive. So you can write "COS(m_pi+x)" or "cos(M_PI+X)", it doesn't matter.
 *
 * Don't worry about the whitespaces and blank characters, they are automatically skipped by the equation parser.
 * That means, for instance, that both "X+1" and "X      + 1" work.
 *
 * This plugin implements basic constant folding. That means that when the plugin analyses the equation,
 * if it can compute some parts of it before compilation, it will. For now, it does not support rational
 * equations simplification.
 * |OVP_DocEnd_BoxAlgorithm_SimpleDSP_Miscellaneous|
 */

/*
 Since the equation is translated into a set of function calls, it is quite slower than it would be if the equation was directly compiled into machine code. Consequently, the plugin uses a number of "built-in" simple equations, which will achieve significantly faster execution times.

 Those equations are :
 - X (identity)
 - X*X or pow(X,2)
 - X + Constant
 - X - Constant
 - X * Constant
 - X / Constant
 - Unaryfunction(X), where Unaryfunction is any of the previously introduced unary functions.
*/
