Skip to main content
`Ctrl`+`K`

# Operator

class tracklib.core.Operator.Operator

  Class defining the usable operators

  The following operators are defined :

  > 1. Unary void operators:

  >    > - IDENTITY: \(y(t) = x(t)\)

  >    > - RECTIFIER: \(y(t) = \|x(t)\|\)

  >    > - INTEGRATOR: \(y(t) = y(t-1) + y(t)\)

  >    > - SHIFT_RIGHT: \(y(t) = x(t-1)\)

  >    > - SHIFT_LEFT: \(y(t) = x(t+1)\)

  >    > - SHIFT_CIRCULAR_RIGHT: \(y(t) = x((t-1)%n)\)

  >    > - SHIFT_CIRCULAR_LEFT: \(y(t) = x((t+1)%n)\)

  >    > - INVERTER: \(y(t) = -x(t)\)

  >    > - INVERSER: \(y(t) = 1/x(t)\)

  >    > - DEBIASER: \(y(t) = x(t) - \bar{x}\)

  >    > - SQUARE: \(y(t) = x(t \cdot x(t)\)

  >    > - SQRT: \(y(t) = x(t)^{1/2}\)

  >    > - NORMALIZER: \(y(t) = \frac{(x(t) - \bar{x})}{\sigma(x)}\)

  >    > - DIFFERENTIATOR: \(y(t) = x(t) - x(t-1)\)

  >    > - BACKWARD_FINITE_DIFF: \(y(t) = x(t) - x(t-1)\)

  >    > - FORWARD_FINITE_DIFF: \(y(t) = x(t+1) - x(t)\)

  >    > - CENTERED_FINITE_DIFF: \(y(t) = x(t+1) - x(t-1)\)

  >    > - SECOND_ORDER_FINITE_DIFF: \(y(t) = x(t+1) - x(t-1)\)

  >    > - DIODE: \(y(t) = 1[x>0] \cdot x(t)\)

  >    > - SIGN: \(y(t) = \frac{x(t)}{\|x(t)\|}\)

  >    > - EXP: \(y(t) = \exp(x(t))\)

  >    > - LOG: \(y(t) = \log(x(t))\)

  >    > - COS: \(y(t) = \cos(x(t))\)

  >    > - SIN: \(y(t) = \sin(x(t))\)

  >    > - TAN: \(y(t) = \tan(x(t))\)

  > 2. Binary void operators:

  >    > - ADDER: \(y(t) = x1(t) + x2(t)\)

  >    > - SUBSTRACTER: \(y(t) = x1(t) - x2(t)\)

  >    > - MULTIPLIER: \(y(t) = x1(t) \cdot x2(t)\)

  >    > - DIVIDER: \(y(t) = x1(t) / x2(t)\)

  >    > - POWER: \(y(t) = x1(t) ^ {x2(t)}\)

  >    > - MODULO: \(y(t) = x1(t) % x2(t)\)

  >    > - ABOVE: \(y(t) = x1(t) > x2(t)\)

  >    > - BELOW: \(y(t) = x1(t) < x2(t)\)

  >    > - QUAD_ADDER: \(y(t) = (x1(t)^2 + x2(t)^2)^0.5\)

  >    > - RENORMALIZER: \(y(t) = (x1(t)-m(x1)) \cdot \frac{s(x2)}{s(x1)} + m(x2)\)

  >    > - DERIVATOR: \(y(t) = \frac{(x1(t)-x1(t-1))}{(x2(t)-x2(t-1))} = \frac{dx1}{dx2}\)

  >    > - POINTWISE_EQUALER: \(y(t) = 1\ \text{if}\ x1(t)=x2(t),\ 0\ \text{otherwise}\)

  >    > - CONVOLUTION: \(y(t) = int(x1(h) \cdot x2(t-h)dh)\)

  > 3. Unary operator

  >    > - SUM: \(y = \Sigma x\)

  >    > - AVERAGER: \(y = \bar{x}\)

  >    > - VARIANCE: \(y = \var(x)\)

  >    > - STDDEV: \(y = \sqrt{\var(x)}\)

  >    > - MSE: \(y = \bar{x^2}\)

  >    > - RMSE: \(y = \sqrt{\bar{x^2}}\)

  >    > - MAD: \(y = \text{median}(|x|)\)

  >    > - MIN: \(y = \min(x)\)

  >    > - MAX: \(y = \max(x)\)

  >    > - MEDIAN: \(y = \text{median}(x)\)

  >    > - ARGMIN: \(y = \min {t | x(t) = \min(x)}\)

  >    > - ARGMAX: \(y = \min {t | x(t) = \max(x)}\)

  >    > - ZEROS: \(y = {t | x(t) = 0}\)

  > 4. Binary operator

  >    > - COVARIANCE: \(y = m[x1x2] - m[x1] \cdot m[x2]\)

  >    > - CORRELATOR: \(y = \frac{\cov(x1,x2)}{\sigma(x1) \cdot sigma(x2)}\)

  >    > - L0: \(y = {t | x1(t) \neq x2(t)}\)

  >    > - L1: \(y = \bar{|x1(t)-x2(t)|}\)

  >    > - L2: \(y = \bar{|x1(t)-x2(t)|^2}\)

  >    > - LINF: \(y = \max(|x1(t)-x2(t)|)\)

  >    > - EQUAL: \(y = 1\ \text{if} {x1(t) = x2(t)\ \text{for all t}}\)

  > 5. Scalar operator

  >    > - AGGREGATE: \(y(t) = arg({x(t)})\) (arg is a list function)

  > 6. Scalar void operator

  >    > - APPLY: \(y(t) = arg(x(t))\) (arg is a real function)

  >    > - SHIFT: \(y(t) = x(t-arg)\) (arg is a integer)

  >    > - SHIFT_REV: \(y(t) = x(t+arg)\) (arg is a integer)

  >    > - SHIFT_CIRCULAR: \(y(t) = x((t-arg)%n)\) (arg is a integer)

  >    > - SHIFT_CIRCULAR_REV: \(y(t) = x((t+arg)%n)\) (arg is a integer)

  >    > - SCALAR_ADDER: \(y(t) = x(t) + arg\) (arg is a numeric)

  >    > - SCALAR_SUBSTRACTER: \(:(t) = x(t) - arg\) (arg is a numeric)

  >    > - SCALAR_MULTIPLIER: \(y(t) = arg * x(t)\) (arg is a numeric)

  >    > - SCALAR_DIVIDER: \(y(t) = x(t) / arg\) (arg is a numeric)

  >    > - SCALAR_POWER: \(y(t) = x(t) ** arg\) (arg is a numeric)

  >    > - SCALAR_MODULO: \(y(t) = x(t) % arg\) (arg is a numeric)

  >    > - SCALAR_ABOVE: \(y(t) = x1(t) > arg\) (arg is a numeric)

  >    > - SCALAR_BELOW: \(y(t) = x1(t) < arg\) (arg is a numeric)

  >    > - SCALAR_REV_ABOVE: \(y(t) = arg < x1(t)\) (arg is a numeric)

  >    > - SCALAR_REV_BELOW: \(y(t) = arg > x1(t)\) (arg is a numeric)

  >    > - SCALAR_REV_SUBSTRACTER: \(y(t) = arg - x(t)\) (arg is a numeric)

  >    > - SCALAR_REV_DIVIDER: \(y(t) = arg / x(t)\) (arg is a numeric)

  >    > - SCALAR_REV_POWER: \(y(t) = arg ** x(t)\) (arg is a numeric)

  >    > - SCALAR_REV_MODULO: \(y(t) = arg % x(t)\) (arg is a numeric)

  >    > - THRESHOLDER: \(= y(t) = 1 if x1(t) >= arg, 0 otherwise\) (arg is a numeric)

  >    > - RANDOM: \(y(t) = eta(t) with eta ~ arg\)

  >    > - FILTER: \(= y(t) = int[x(z)*h(t-z)dz]\) (arg is an odd-dimension vector or a kernel)

  >    > - FILTER_FFT: \(y(t) = int[x(z)*h(t-z)dz]\) (fast version with FFT)

  __init__()
  __str__()

    Return str(self).

This modules contains the classes to manage the operators

class tracklib.core.Operator.UnaryOperator

  Abstract Class to define a Unary Operator

  abstract execute(track, af_input)

    Execution of the operator

    Parameters

      - track – TODO

      - af_input – TODO

class tracklib.core.Operator.BinaryOperator

  Abstract Class to define a Binary Operator

  abstract execute(track, af_input1, af_input2)

    Execution of the operator

    Parameters

      - track – TODO

      - af_input1 – TODO

      - af_input2 – TODO

class tracklib.core.Operator.UnaryVoidOperator

  Abstract Class to define a Unary Void Operator

  abstract execute(track, af_input, af_output)

    Execution of the operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

class tracklib.core.Operator.BinaryVoidOperator

  Abstract Class to define a Binary Void Operator

  abstract execute(track, af_input1, af_input2, af_output)

    Execution of the operator

    Parameters

      - track – TODO

      - af_input1 – TODO

      - af_input2 – TODO

      - af_output – TODO

class tracklib.core.Operator.ScalarOperator

  Abstract Class to define a Scalar Operator

  abstract execute(track, af_input1, arg)

    Execution of the operator

    Parameters

      - track – TODO

      - af_input1 – TODO

      - arg – TODO

class tracklib.core.Operator.ScalarVoidOperator

  Abstract Class to define a Scalar Void Operator

  abstract execute(track, af_input1, arg, af_output)

    Execution of the operator

    Parameters

      - track – TODO

      - af_input1 – TODO

      - arg – TODO

      - af_output –

tracklib.core.Operator.makeRPN(expression)

  TODO

  Parameters

    expression (`str`) – An RPN expression

  Return type

    `str`

  Returns

    TODO

class tracklib.core.Operator.Identity

  Identity operator

  execute(track, af_input, af_output)

    Execute the identity operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Integrator

  Integrator operator

  execute(track, af_input, af_output)

    Execute the integrator operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Differentiator

  Differentiator Operator

  execute(track, af_input, af_output)

    Execute the Differentiator operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.ForwardFiniteDiff

  ForwardFiniteDiff Operator

  execute(track, af_input, af_output)

    Execute the ForwardFiniteDiff operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.BackwardFiniteDiff

  BackwardFiniteDiff Operator

  execute(track, af_input, af_output)

    Execute the BackwardFiniteDiff operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.CenteredFiniteDiff

  CenteredFiniteDiff Operator

  execute(track, af_input, af_output)

    Execute the CenteredFiniteDiff operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.SecondOrderFiniteDiff

  SecondOrderFiniteDiff Operator

  execute(track, af_input, af_output)

    Execute the SecondOrderFiniteDiff operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.ShiftRight

  ShiftRight Operator

  execute(track, af_input, af_output)

    Execute the ShiftRight operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.ShiftCircularRight

  ShiftRight Operator

  execute(track, af_input, af_output)

    Execute the ShiftRight operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.ShiftLeft

  ShiftLeft Operator

  execute(track, af_input, af_output)

    Execute the ShiftCircularLeft operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.ShiftCircularLeft

  ShiftLeft Operator

  execute(track, af_input, af_output)

    Execute the ShiftCircularLeft operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Inverter

  Inverter Operator

  execute(track, af_input, af_output)

    Execute the Inverter operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Inverser

  Inverser Operator

  execute(track, af_input, af_output)

    Execute the Inverser operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Reverser

  Reverser Operator

  execute(track, af_input, af_output)

    Execute the Reverser operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Rectifier

  Rectifier Operator

  execute(track, af_input, af_output)

    Execute the Rectifier operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Debiaser

  Debiaser Operator

  execute(track, af_input, af_output)

    Execute the Debiaser operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Normalizer

  Normalizer Operator

  execute(track, af_input, af_output)

    Execute the Normaliser operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Square

  Square Operator

  execute(track, af_input, af_output)

    Execute the Square operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Sqrt

  Sqrt Operator

  execute(track, af_input, af_output)

    Execute the Sqrt operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Diode

  Diode Operator

  execute(track, af_input, af_output)

    Execute the Diode operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Sign

  Sign Operator

  execute(track, af_input, af_output)

    Execute the Sign operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Exp

  Exp Operator

  execute(track, af_input, af_output)

    Execute the Exp operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Log

  Log Operator

  execute(track, af_input, af_output)

    Execute the Log operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Cos

  Cos Operator

  execute(track, af_input, af_output)

    Execute the Cos operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Sin

  Sin operator

  execute(track, af_input, af_output)

    Execute the Sin operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Tan

  Tan Operator

  execute(track, af_input, af_output)

    Execute the Tan operator

    Parameters

      - track – TODO

      - af_input – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Adder

  Adder Operator

  execute(track, af_input1, af_input2, af_output)

    Execute the Normaliser operator

    Parameters

      - track – TODO

      - af_input1 – TODO

      - af_input2 – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Substracter

  Substracter Operator

  execute(track, af_input1, af_input2, af_output)

    Execute the Substracter operator

    Parameters

      - track – TODO

      - af_input1 – TODO

      - af_input2 – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Multiplier

  Multiplier Operator

  execute(track, af_input1, af_input2, af_output)

    Execute the Multiplier operator

    Parameters

      - track – TODO

      - af_input1 – TODO

      - af_input2 – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Divider

  Divider Operator

  execute(track, af_input1, af_input2, af_output)

    Execute the Divier operator

    Parameters

      - track – TODO

      - af_input1 – TODO

      - af_input2 – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Power

  Power operator

  execute(track, af_input1, af_input2, af_output)

    Execute the Power operator

    Parameters

      - track – TODO

      - af_input1 – TODO

      - af_input2 – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Modulo

  Modulo Operator

  execute(track, af_input1, af_input2, af_output)

    Execute the Modulo operator

    Parameters

      - track – TODO

      - af_input1 – TODO

      - af_input2 – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Above

  Above Operator

  execute(track, af_input1, af_input2, af_output)

    Execute the Above operator

    Parameters

      - track – TODO

      - af_input1 – TODO

      - af_input2 – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Below

  Below Operator

  execute(track, af_input1, af_input2, af_output)

    Execute the Below operator

    Parameters

      - track – TODO

      - af_input1 – TODO

      - af_input2 – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.QuadraticAdder

  Quadratic Adder Operator

  execute(track, af_input1, af_input2, af_output)

    Execute the Quadratic Adder operator

    Parameters

      - track – TODO

      - af_input1 – TODO

      - af_input2 – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Derivator

  Derivator Operator

  execute(track, af_input1, af_input2, af_output)

    Execute the Derivator operator

    Parameters

      - track – TODO

      - af_input1 – TODO

      - af_input2 – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Renormalizer

  Renormalizer Operator

  execute(track, af_input1, af_input2, af_output)

    Execute the Renormalizer operator

    Parameters

      - track – TODO

      - af_input1 – TODO

      - af_input2 – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.PointwiseEqualer

  Pointwiser Equaler Operator

  execute(track, af_input1, af_input2, af_output)

    Execute the Pointwiser Equaler operator

    Parameters

      - track – TODO

      - af_input1 – TODO

      - af_input2 – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Convolution

  Convolution Operator

  execute(track, af_input1, af_input2, af_output)

    Execute the Convolution operator

    Parameters

      - track – TODO

      - af_input1 – TODO

      - af_input2 – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Correlator

  Correlator Operator

  execute(track, af_input1, af_input2, af_output)

    Execute the Correlator operator

    Parameters

      - track – TODO

      - af_input1 – TODO

      - af_input2 – TODO

      - af_output – TODO

    Returns

      TODO

class tracklib.core.Operator.Min

  Min Operator

  execute(track, af_input)

    TODO

class tracklib.core.Operator.Max

  TODO

  execute(track, af_input)

    TODO

class tracklib.core.Operator.Argmin

  TODO

  execute(track, af_input)

    TODO

class tracklib.core.Operator.Argmax

  TODO

  execute(track, af_input)

    TODO

class tracklib.core.Operator.Median

  TODO

  execute(track, af_input)

    TODO

class tracklib.core.Operator.Zeros

  TODO

  execute(track, af_input)

    TODO

class tracklib.core.Operator.Sum

  TODO

  execute(track, af_input)

    TODO

class tracklib.core.Operator.Averager

  The average operator: y = mean(x)

  execute(track, af_input)

    TODO

class tracklib.core.Operator.Variance

  TODO

  execute(track, af_input)

    TODO

class tracklib.core.Operator.StdDev

  TODO

  execute(track, af_input)

    TODO

class tracklib.core.Operator.Mse

  TODO

  execute(track, af_input)

    TODO

class tracklib.core.Operator.Rmse

  Rmse Operator

  execute(track, af_input)

    Execution of Rmse operator

class tracklib.core.Operator.Mad

  TODO

  execute(track, af_input)

    TODO

class tracklib.core.Operator.Covariance

  TODO

  execute(track, af_input1, af_input2)

    TODO

class tracklib.core.Operator.Correlation

  TODO

  execute(track, af_input1, af_input2)

    TODO

class tracklib.core.Operator.L0Diff

  TODO

  execute(track, af_input1, af_input2)

    TODO

class tracklib.core.Operator.L1Diff

  TODO

  execute(track, af_input1, af_input2)

    TODO

class tracklib.core.Operator.L2Diff

  TODO

  execute(track, af_input1, af_input2)

    TODO

class tracklib.core.Operator.LInfDiff

  TODO

  execute(track, af_input1, af_input2)

    TODO

class tracklib.core.Operator.Equal

  TODO

  execute(track, af_input1, af_input2)

    TODO

class tracklib.core.Operator.Aggregate

  TODO

  execute(track, af_input, function)

    TODO

class tracklib.core.Operator.Shift

  TODO

  execute(track, af_input, number, af_output)

    TODO

class tracklib.core.Operator.ShiftCircular

  TODO

  execute(track, af_input, number, af_output)

    TODO

class tracklib.core.Operator.ShiftRev

  TODO

  execute(track, af_input, number, af_output)

    TODO

class tracklib.core.Operator.ShiftCircularRev

  TODO

  execute(track, af_input, number, af_output)

    TODO

class tracklib.core.Operator.ScalarAdder

  TODO

  execute(track, af_input, number, af_output)

    TODO

class tracklib.core.Operator.ScalarSubstracter

  TODO

  execute(track, af_input, number, af_output)

    TODO

class tracklib.core.Operator.ScalarRevSubstracter

  TODO

  execute(track, af_input, number, af_output)

    TODO

class tracklib.core.Operator.ScalarMuliplier

  TODO

  execute(track, af_input, number, af_output)

    TODO

class tracklib.core.Operator.ScalarDivider

  TODO

  execute(track, af_input, number, af_output)

    TODO

class tracklib.core.Operator.ScalarRevDivider

  TODO

  execute(track, af_input, number, af_output)

    TODO

class tracklib.core.Operator.ScalarPower

  TODO

  execute(track, af_input, number, af_output)

    TODO

class tracklib.core.Operator.ScalarModulo

  TODO

  execute(track, af_input, number, af_output)

    TODO

class tracklib.core.Operator.ScalarBelow

  TODO

  execute(track, af_input, number, af_output)

    TODO

class tracklib.core.Operator.ScalarRevBelow

  TODO

  execute(track, af_input, number, af_output)

    TODO

class tracklib.core.Operator.ScalarAbove

  TODO

  execute(track, af_input, number, af_output)

    TODO

class tracklib.core.Operator.ScalarRevAbove

  TODO

  execute(track, af_input, number, af_output)

    TODO

class tracklib.core.Operator.ScalarRevPower

  TODO

  execute(track, af_input, number, af_output)

    TODO

class tracklib.core.Operator.ScalarRevModulo

  TODO

  execute(track, af_input, number, af_output)

    TODO

class tracklib.core.Operator.Thresholder

  TODO

  execute(track, af_input, number, af_output)

    TODO

class tracklib.core.Operator.Apply

  TODO

  execute(track, af_input, function, af_output)

    TODO

class tracklib.core.Operator.Filter

  TODO

  execute(track, af_input, kernel, af_output)

    TODO

class tracklib.core.Operator.Filter_FFT

  TODO

  execute(track, af_input, kernel, af_output)

    TODO

class tracklib.core.Operator.Random

  TODO

  execute(track, af_input, probability, af_output)

    TODO