name: Algorithm : public AlgorithmBase

synopsis:

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

#include <Algorithm.h>

Algorithm alg;
boolean assign(const AlgorithmBase* arg);
boolean setType(TYPES type);
boolean apply(AlgorithmData& output, const CircularBuffer& input, BUF_MODE mode = DEF_BUF_MODE);
boolean setSampleFrequency(float sf);
boolean setFrameDuration(float dur);
long getLeadingPad() const;
long getTrailingPad() const;
boolean init();
quick start:

Algorithm alg;

// test Window
//
alg.setType(Algorithm::WINDOW);
Window win;
win.setSize(5);
win.setAlgorithm(Window::RECTANGULAR);
alg.assign(win);

AlgorithmData uw_sig;
uw_sig.makeVectorFloat().assign(L"1, 2, 1, 3, 4, 2, 3, 1");

// need to produce a Vector<CircularBuffer<AlgorithmData>>
//
Vector<CircularBuffer<AlgorithmData>>tmp_buf(1);
tmp_buf(0).append(uw_sig);

alg.apply(output, tmp_buf);
description:

Algorithm is a class that transforms data by invoking any of the algorithms included in the Algorithm library using a virtual function interface. It inherits the AlgorithmBase class, which is an abstract base class having virtual functions. The virtual functions allow the derived class to replace the functionality provided by the base class. The AlgorithmBase class defines the interface contract for all Algorithm class (e.g., Energy). The AlgorithmData class is simply a container class for data passed by the algorithm classes.

dependencies:

public constants:

error codes:

protected data:

required public methods:

class-specific public methods:

private methods:

examples:

notes: