name: Energy : public AlgorithmBase

synopsis:

g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_algo.a

#include <Energy.h>

Energy(ALGORITHM algorithm = DEF_ALGORITHM, IMPLEMENTATION implementation = DEF_IMPLEMENTATION, float floor);
boolean eq(const Energy& arg);
boolean setAlgorithm(ALGORITHM algorithm);
boolean setFloor(float floor);
quick start:

Energy egy;
VectorFloat input(L"1, 0, -1");
VectorFloat output;
egy.setAlgorithm(Energy::IDENTITY);
egy.compute(output, input);
description:

The Energy class is used to compute the energy and power of a signal. Two good historical references for different ways to define and compute the energy of a signal are:
This class currently supports two algorithm choices: SUM and FILTER. These are described in detail below. Several scaling modes are supported as implementation choices including dB and RMS, both popular in engineering. The implementation choices for the algorithm choice SUM, along with the available scaling options, are shown below:


The FILTER algorithm processes the squared signal through a user-defined filter: This filter can be written as: The filter can be specified by the user using the setFilter() method.

The same implementation choices available for SUM apply to FILTER, even though users most often will want to use the IDENTITY implementation for this algorithm choice.

dependencies:

public constants:

error codes:

protected data:

required public methods:

class-specific public methods:

private methods:

examples:

notes: