AFF3CT
A Fast Forward Error Correction Tool!
 All Classes Files Functions Variables Pages
Public Member Functions | Protected Attributes | List of all members
Quantizer_i< R, Q > Class Template Referenceabstract

Quantizes floating-point data to fixed-point representation. More...

#include <Quantizer.hpp>

Inheritance diagram for Quantizer_i< R, Q >:
Module SC_Quantizer< R, Q > Quantizer_fast< R, Q > Quantizer_NO< R, Q > Quantizer_standard< R, Q > Quantizer_tricky< R, Q >

Public Member Functions

 Quantizer_i (const int N, const int n_frames=1, const std::string name="Quantizer_i")
 Constructor. More...
 
virtual ~Quantizer_i ()
 Destructor.
 
virtual void process (const mipp::vector< R > &Y_N1, mipp::vector< Q > &Y_N2)=0
 Quantizes the data if Q is a fixed-point representation, does nothing else. More...
 
- Public Member Functions inherited from Module
 Module (const int n_frames=1, const std::string name="Module")
 Constructor. More...
 
virtual ~Module ()
 Destructor.
 
virtual void set_n_frames (const int n_frames)
 Set the number of frames. More...
 
virtual int get_n_frames () const
 Get the number of frames. More...
 
void rename (const std::string name)
 Rename the Module. More...
 

Protected Attributes

const int N
 
- Protected Attributes inherited from Module
int n_frames
 
std::string name
 

Detailed Description

template<typename R, typename Q>
class Quantizer_i< R, Q >

Quantizes floating-point data to fixed-point representation.

Template Parameters
Rtype of the reals (floating-point representation) in the Quantizer.
Qtype of the reals (floating-point or fixed-point representation) in the Quantizer.

Please use Quantizer for inheritance (instead of Quantizer_i). If Q is a floating-point representation then the Quantizer does nothing more than a cast.

Constructor & Destructor Documentation

template<typename R , typename Q >
Quantizer_i< R, Q >::Quantizer_i ( const int  N,
const int  n_frames = 1,
const std::string  name = "Quantizer_i< R, Q >" 
)
inline

Constructor.

Parameters
Nsize of one frame.
n_framesnumber of frames to process in the Decoder.
nameQuantizer's name.

Member Function Documentation

template<typename R , typename Q >
virtual void Quantizer_i< R, Q >::process ( const mipp::vector< R > &  Y_N1,
mipp::vector< Q > &  Y_N2 
)
pure virtual

Quantizes the data if Q is a fixed-point representation, does nothing else.

Parameters
Y_N1a vector of floating-point data.
Y_N2a vector of quantized data (fixed-point representation).

Implemented in Quantizer_tricky< R, Q >, Quantizer_standard< R, Q >, Quantizer_fast< R, Q >, and Quantizer_NO< R, Q >.

Member Data Documentation

template<typename R , typename Q >
const int Quantizer_i< R, Q >::N
protected

Size of one frame (= number of bits in one frame)


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