Essentia
2.1-beta6-dev
|
#include <vectorinput.h>
Public Member Functions | |
VectorInput (const std::vector< TokenType > *input=0, bool own=false) | |
VectorInput (std::vector< TokenType > *input, bool own=false) | |
template<typename Array > | |
VectorInput (const Array &inputArray, bool own=true) | |
VectorInput (const TNT::Array2D< Real > &input) | |
~VectorInput () | |
void | clear () |
void | setVector (const std::vector< TokenType > *input, bool own=false) |
void | setAcquireSize (const int size) |
void | reset () |
bool | shouldStop () const |
AlgorithmStatus | process () |
void | declareParameters () |
Public Member Functions inherited from Algorithm | |
Algorithm () | |
virtual | ~Algorithm () |
SinkBase & | input (const std::string &name) |
SourceBase & | output (const std::string &name) |
SinkBase & | input (int idx) |
SourceBase & | output (int idx) |
const InputMap & | inputs () const |
const OutputMap & | outputs () const |
std::vector< std::string > | inputNames () const |
std::vector< std::string > | outputNames () const |
virtual void | shouldStop (bool stop) |
void | disconnectAll () |
AlgorithmStatus | acquireData () |
void | releaseData () |
Public Member Functions inherited from Configurable | |
virtual | ~Configurable () |
const std::string & | name () const |
void | setName (const std::string &name) |
virtual void | setParameters (const ParameterMap ¶ms) |
virtual void | configure (const ParameterMap ¶ms) |
virtual void | configure () |
const ParameterMap & | defaultParameters () const |
const Parameter & | parameter (const std::string &key) const |
Protected Attributes | |
Source< TokenType > | _output |
const std::vector< TokenType > * | _inputVector |
bool | _ownVector |
int | _idx |
int | _acquireSize |
Protected Attributes inherited from Algorithm | |
bool | _shouldStop |
OutputMap | _outputs |
InputMap | _inputs |
int | nProcess |
Protected Attributes inherited from Configurable | |
std::string | _name |
ParameterMap | _params |
ParameterMap | _defaultParams |
Additional Inherited Members | |
Public Types inherited from Algorithm | |
typedef OrderedMap< SinkBase > | InputMap |
typedef OrderedMap< SourceBase > | OutputMap |
Public Attributes inherited from Algorithm | |
DescriptionMap | inputDescription |
DescriptionMap | outputDescription |
Public Attributes inherited from Configurable | |
DescriptionMap | parameterDescription |
DescriptionMap | parameterRange |
Static Public Attributes inherited from Algorithm | |
static const std::string | processingMode |
Protected Member Functions inherited from Algorithm | |
void | declareInput (SinkBase &sink, const std::string &name, const std::string &desc) |
void | declareInput (SinkBase &sink, int n, const std::string &name, const std::string &desc) |
void | declareInput (SinkBase &sink, int acquireSize, int releaseSize, const std::string &name, const std::string &desc) |
void | declareOutput (SourceBase &source, const std::string &name, const std::string &desc) |
void | declareOutput (SourceBase &source, int n, const std::string &name, const std::string &desc) |
void | declareOutput (SourceBase &source, int acquireSize, int releaseSize, const std::string &name, const std::string &desc) |
Protected Member Functions inherited from Configurable | |
void | declareParameter (const std::string &name, const std::string &desc, const std::string &range, const Parameter &defaultValue) |
|
inline |
|
inline |
|
inline |
References VectorInput< TokenType, acquireSize >::_acquireSize, VectorInput< TokenType, acquireSize >::_inputVector, VectorInput< TokenType, acquireSize >::_output, VectorInput< TokenType, acquireSize >::_ownVector, Algorithm::declareOutput(), VectorInput< TokenType, acquireSize >::reset(), VectorInput< TokenType, acquireSize >::setAcquireSize(), and Configurable::setName().
|
inline |
References VectorInput< TokenType, acquireSize >::_acquireSize, VectorInput< TokenType, acquireSize >::_inputVector, VectorInput< TokenType, acquireSize >::_output, VectorInput< TokenType, acquireSize >::_ownVector, Algorithm::declareOutput(), Algorithm::input(), VectorInput< TokenType, acquireSize >::reset(), VectorInput< TokenType, acquireSize >::setAcquireSize(), and Configurable::setName().
|
inline |
References VectorInput< TokenType, acquireSize >::clear().
|
inline |
|
inlinevirtual |
Declare the parameters that this Configurable
can accept. You have to implement this method in derived classes, even though you don't need any parameters. In that case, just define it as empty.
In this method you should only be calling the declareParameter
method, once for each parameter, with optional default values.
Implements Configurable.
|
inlinevirtual |
Implements Algorithm.
References VectorInput< TokenType, acquireSize >::_idx, VectorInput< TokenType, acquireSize >::_inputVector, VectorInput< TokenType, acquireSize >::_output, Algorithm::acquireData(), EXEC_DEBUG, essentia::fastcopy(), essentia::streaming::NO_INPUT, essentia::streaming::NO_OUTPUT, essentia::streaming::OK, essentia::streaming::PASS, Algorithm::releaseData(), and VectorInput< TokenType, acquireSize >::shouldStop().
|
inlinevirtual |
This function will be called when doing batch computations between each file that is processed. That is, if your algorithm is some sort of state machine, it allows you to reset it to its original state to process another file without having to delete and reinstantiate it. This function should not be called directly. Use resetNetwork instead to reset a network of connected Algorithms.
Reimplemented from Algorithm.
References VectorInput< TokenType, acquireSize >::_acquireSize, VectorInput< TokenType, acquireSize >::_idx, VectorInput< TokenType, acquireSize >::_output, and Algorithm::reset().
Referenced by VectorInput< TokenType, acquireSize >::VectorInput().
|
inline |
|
inline |
TODO: Should we make a copy of the vector here or only keep the ref?
References VectorInput< TokenType, acquireSize >::_inputVector, VectorInput< TokenType, acquireSize >::_ownVector, VectorInput< TokenType, acquireSize >::clear(), and Algorithm::input().
|
inlinevirtual |
Returns whether the algorithm should stop, ie: it has received an end-of-stream signal.
Reimplemented from Algorithm.
References VectorInput< TokenType, acquireSize >::_idx, and VectorInput< TokenType, acquireSize >::_inputVector.
Referenced by VectorInput< TokenType, acquireSize >::process().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |