MachineIntelligenceCore:Algorithms
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Encoder.hpp
Go to the documentation of this file.
1 
23 #ifndef __ENCODER_HPP__
24 #define __ENCODER_HPP__
25 
26 #include <string>
27 #include <vector>
28 #include <iostream>
29 
30 #include <memory> // std::shared_ptr
31 
32 namespace mic {
33 
38 namespace encoders {
39 
47 template <typename inputDataType, typename SDRType>
48 class Encoder {
49 public:
50 
54  Encoder() {
55 // std::cout<<" Hello Encoder\n";
56  };
57 
61  virtual ~Encoder() { };
62 
68  virtual std::shared_ptr<SDRType> encodeSample(const std::shared_ptr<inputDataType>& sample_) = 0;
69 
70 
76  virtual std::shared_ptr<inputDataType> decodeSample(const std::shared_ptr<SDRType>& sdr_) = 0;
77 
78 };
79 
80 
81 
82 } // namespace auto_encoders
83 } // namespace mic
84 
85 #endif
Encoder()
Constructor - empty.
Definition: Encoder.hpp:54
virtual std::shared_ptr< inputDataType > decodeSample(const std::shared_ptr< SDRType > &sdr_)=0
Abstract parent class for all encoders.
Definition: Encoder.hpp:48
virtual std::shared_ptr< SDRType > encodeSample(const std::shared_ptr< inputDataType > &sample_)=0
Method responsible for encoding input sample into SDR.