MachineIntelligenceCore:Algorithms
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
mic::encoders::MatrixSDREncoder< inputDataType, outputDataType > Class Template Reference

Abstract parent class for all encoders using MatrixXf as SDR datatype. More...

#include <MatrixSDREncoder.hpp>

Inheritance diagram for mic::encoders::MatrixSDREncoder< inputDataType, outputDataType >:
Collaboration diagram for mic::encoders::MatrixSDREncoder< inputDataType, outputDataType >:

Public Member Functions

 MatrixSDREncoder (size_t sdr_length_)
 Constructor. More...
 
virtual ~MatrixSDREncoder ()
 
virtual std::shared_ptr
< mic::types::Matrix
< outputDataType > > 
encodeBatch (const std::vector< std::shared_ptr< inputDataType > > &batch_)
 
virtual std::vector
< std::shared_ptr
< inputDataType > > 
decodeBatch (const std::shared_ptr< mic::types::Matrix< outputDataType > > &sdrs_)
 
size_t getSDRLength ()
 
void setSDRLength (size_t sdr_length_)
 
- Public Member Functions inherited from mic::encoders::Encoder< inputDataType, mic::types::Matrix< outputDataType > >
 Encoder ()
 Constructor - empty. More...
 
virtual ~Encoder ()
 
virtual std::shared_ptr
< mic::types::Matrix
< outputDataType > > 
encodeSample (const std::shared_ptr< inputDataType > &sample_)=0
 Method responsible for encoding input sample into SDR. More...
 
virtual std::shared_ptr
< inputDataType > 
decodeSample (const std::shared_ptr< mic::types::Matrix< outputDataType > > &sdr_)=0
 

Protected Attributes

size_t sdr_length
 Length of SDR. More...
 

Detailed Description

template<typename inputDataType, typename outputDataType = float>
class mic::encoders::MatrixSDREncoder< inputDataType, outputDataType >

Abstract parent class for all encoders using MatrixXf as SDR datatype.

Author
tkornuta
Template Parameters
inputDataTypeTemplate parameter defining the input (sample) datatype.
SDRTypeTemplate parameter defining the SDR type.

Definition at line 41 of file MatrixSDREncoder.hpp.

Constructor & Destructor Documentation

template<typename inputDataType, typename outputDataType = float>
mic::encoders::MatrixSDREncoder< inputDataType, outputDataType >::MatrixSDREncoder ( size_t  sdr_length_)
inline

Constructor.

Parameters
sdr_length_SDR length.

Definition at line 47 of file MatrixSDREncoder.hpp.

template<typename inputDataType, typename outputDataType = float>
virtual mic::encoders::MatrixSDREncoder< inputDataType, outputDataType >::~MatrixSDREncoder ( )
inlinevirtual

Virtual destructor - empty.

Definition at line 56 of file MatrixSDREncoder.hpp.

Member Function Documentation

template<typename inputDataType, typename outputDataType = float>
virtual std::vector<std::shared_ptr<inputDataType> > mic::encoders::MatrixSDREncoder< inputDataType, outputDataType >::decodeBatch ( const std::shared_ptr< mic::types::Matrix< outputDataType > > &  sdrs_)
inlinevirtual

Method responsible for encoding batch containing several samples into matrix containing several SDRs. Each sample SDR is stored in a separate column.

Parameters
[in]batch_Vector of shared pointers containing samples
Returns
Matrix containing several SDRs.

Definition at line 87 of file MatrixSDREncoder.hpp.

Referenced by main().

template<typename inputDataType, typename outputDataType = float>
virtual std::shared_ptr<mic::types::Matrix<outputDataType> > mic::encoders::MatrixSDREncoder< inputDataType, outputDataType >::encodeBatch ( const std::vector< std::shared_ptr< inputDataType > > &  batch_)
inlinevirtual

Method responsible for encoding batch containing several samples into matrix containing several SDRs.

Parameters
[in]batch_Vector of shared pointers containing samples
Returns
Matrix containing several SDRs.

Definition at line 64 of file MatrixSDREncoder.hpp.

Referenced by main().

template<typename inputDataType, typename outputDataType = float>
size_t mic::encoders::MatrixSDREncoder< inputDataType, outputDataType >::getSDRLength ( )
inline

Returns the SDR length.

Definition at line 108 of file MatrixSDREncoder.hpp.

template<typename inputDataType, typename outputDataType = float>
void mic::encoders::MatrixSDREncoder< inputDataType, outputDataType >::setSDRLength ( size_t  sdr_length_)
inline

Sets SDR length.

Parameters
sdr_length_SDR length.

Definition at line 116 of file MatrixSDREncoder.hpp.

Member Data Documentation

template<typename inputDataType, typename outputDataType = float>
size_t mic::encoders::MatrixSDREncoder< inputDataType, outputDataType >::sdr_length
protected

The documentation for this class was generated from the following file: