quick start:g++ [flags ...] file ...-l /isip/tools/lib/$ISIP_BINARY/lib_algo.a #include <Rps.h> Rps(ALGORITHM algorithm = DEF_ALGORITHM, IMPLEMENTATION implementation = DEF_IMPLEMENTATION, long embed_dimension = DEF_EMBED_DIMENSION, long svd_window_size = DEF_SVD_WINDOW_SIZE, float delay = DEF_DELAY, float svd_threshold = DEF_SVD_THRESHOLD); boolean compute(MatrixFloat& output, const VectorFloat& input, AlgorithmData::COEF_TYPE input_coef_type = DEF_COEF_TYPE, long index = DEF_CHANNEL_INDEX); boolean compute(MatrixFloat& output, const MatrixFloat& input, AlgorithmData::COEF_TYPE input_coef_type = DEF_COEF_TYPE, long index = DEF_CHANNEL_INDEX);
description:Rps rps0; Rps rps1(rps0); VectorFloat input(L"0, 1, 2, 3, 4, 5"); MatrixFloat output; rps1.setAlgorithm(Rps::SVD_EMBEDDING); rps1.compute(output, input);
static const String CLASS_NAME = L"Rps";
enum ALGORITHM { TIME_DELAY_EMBEDDING = 0, SVD_EMBEDDING, DEF_ALGORITHM = TIME_DELAY_EMBEDDING };
enum IMPLEMENTATION { EMBEDDING = 0, DEF_IMPLEMENTATION = EMBEDDING};
static const NameMap Rps::ALGO_MAP(L"TIME_DELAY_EMBEDDING, SVD_EMBEDDING");
static const NameMap IMPL_MAP = L"EMBEDDING";
static const String Rps::DEF_PARAM = L"";
static const String Rps::PARAM_ALGORITHM = L"algorithm";
static const String Rps::PARAM_IMPLEMENTATION = L"implementation";
static const String Rps::PARAM_CMODE = L"compute_mode";
static const String Rps::PARAM_EMBED_DIMENSION = L"embed_dimension";
static const String Rps::PARAM_DELAY = L"delay";
static const String Rps::PARAM_SVD_WINDOW_SIZE = L"svd_window_size";
static const String Rps::PARAM_SVD_THRESHOLD = L"svd_threshold";
static const long DEF_EMBED_DIMENSION = -1;
static const float DEF_DELAY = -1.0;
static const long DEF_SVD_WINDOW_SIZE = -1;
static const float DEF_SVD_THRESHOLD = -1.0;
static const AlgorithmData::COEF_TYPE DEF_COEF_TYPE = AlgorithmData::SIGNAL;
static const long ERR = 73400;
static const long ERR_INP = 73401;
static const long ERR_EMBEDDIM = 73402;
static const long ERR_SVDDIM = 73403;
ALGORITHM algorithm_d;
IMPLEMENTATION implementation_d;
Long embed_dimension_d;
Float delay_d;
Long svd_window_size_d;
Float svd_threshold_d;
VectorFloat accum_buf_d;
static MemoryManager mgr_d;
static const String& name();
static boolean diagnose(Integral::DEBUG debug_level);
boolean debug(const unichar* message) const;
~Rps();
Rps(ALGORITHM algorithm = DEF_ALGORITHM, IMPLEMENTATION implementation = DEF_IMPLEMENTATION, long embed_dimension = DEF_EMBED_DIMENSION, long svd_window_size = DEF_SVD_WINDOW_SIZE, float delay = DEF_DELAY, float svd_threshold = DEF_SVD_THRESHOLD);
Rps(const Rps& arg);
boolean assign(const Rps& arg);
Rps& operator= (const Rps& arg);
long sofSize() const;
boolean read(Sof& sof, long tag, const String& name = CLASS_NAME);
boolean write(Sof& sof, long tag, const String& name = CLASS_NAME) const;
boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);
boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;
boolean eq(const Rps& arg) const;
static void* operator new(size_t size);
static void* operator new[](size_t size);
static void operator delete(void* ptr);
static void operator delete[](void* ptr);
static boolean setGrowSize(long grow_size);
boolean clear(Integral::CMODE ctype = Integral::DEF_CMODE);
boolean setAlgorithm(ALGORITHM algorithm);
boolean setImplementation(IMPLEMENTATION implementation);
boolean setEmbedDimension(long embed_dimension);
boolean setSVDWindowSize(long svd_window_size);
boolean setDelay(float delay);
boolean setSVDThreshold(float svd_threshold);
boolean set(ALGORITHM algorithm = DEF_ALGORITHM, IMPLEMENTATION implementation = DEF_IMPLEMENTATION, long embed_dimension = DEF_EMBED_DIMENSION, long svd_window_size = DEF_SVD_WINDOW_SIZE, float delay = DEF_DELAY, float svd_threshold = DEF_SVD_THRESHOLD);
ALGORITHM getAlgorithm();
IMPLEMENTATION getImplementation() const;
long getEmbedDimension();
long getSVDWindowSize();
float getDelay();
float getSVDThreshold();
boolean get(ALGORITHM& algorithm, IMPLEMENTATION& implementation, long& embed_dimension, long& svd_window_size, float& delay, float& svd_threshold) const;
boolean compute(VectorFloat& output, const VectorFloat& input, AlgorithmData::COEF_TYPE input_coef_type = DEF_COEF_TYPE, long index = DEF_CHANNEL_INDEX);
boolean compute(VectorFloat& output, const MatrixFloat& input, AlgorithmData::COEF_TYPE input_coef_type = DEF_COEF_TYPE, long index = DEF_CHANNEL_INDEX);
boolean assign(const AlgorithmBase& arg);
boolean eq(const AlgorithmBase& arg) const;
const String& className() const;
boolean apply(Vector<AlgorithmData>& output, const Vector< CircularBuffer<AlgorithmData> >& input);
boolean setParser(SofParser* parser);
boolean readDataCommon(Sof& sof, const String& pname, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);
boolean writeDataCommon(Sof& sof, const String& pname) const;
boolean computeFrameInt(MatrixFloat& output, const VectorFloat& input);
boolean computeFrameInt(MatrixFloat& output, const MatrixFloat& input);
boolean computeAccumulate(MatrixFloat& output, const VectorFloat& input, long index = DEF_CHANNEL_INDEX);
boolean computeTimeDelayEmbedding(MatrixFloat& output, const VectorFloat& input);
boolean computeTimeDelayEmbedding(MatrixFloat& output, const MatrixFloat& input);
boolean computeSVDEmbedding(MatrixFloat& output, const VectorFloat& input);
boolean computeSVDEmbedding(MatrixFloat& output, const MatrixFloat& input);
// isip include files // #include <Rps.h> // main program starts here // int main(int argc, const char **argv) { // declare Rps object Rps rps(Rps::TIME_DELAY_EMBEDDING, Rps::EMBEDDING, 3, 1, 0.01); // set the sample frequency (needed for calculating delay in samples) // rps.setSampleFrequency(100); // declare input // VectorFloat input(L"0, 1, 2, 3, 4, 5, 6"); // declare output // MatrixFloat output; // compute time-delay embedding // rps.compute(output, input); output.debug(L"rps matrix"); // exit gracefully // return true; }