Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SampledSignal< T > Class Template Reference
[BOSS OLA Module]

Signal represented by samples. More...

#include <sampled_signal.h>

Inheritance diagram for SampledSignal< T >:

DoublePeriod< T > OLA_Frame< T > List of all members.

Public Member Functions

 SampledSignal (long size)
 SampledSignal constructor.

 SampledSignal (T *data, unsigned long size)
 SampledSignal constructor.

 SampledSignal (const SampledSignal< T > &other, long, long)
 SampledSignal constructor.

T & at (long index)
 Returns the sample value at index.

at (long index) const
 Returns the sample value at index.

SampledSignal< T > & add (SampledSignal< T > &, long)
 Adds samples of another signal to the samples of current signal.

SampledSignal< T > & multiply (SampledSignal< T > &, long)
 Multiplies the samples with samples of another SampledSignal and stores back the results.

SampledSignal< T > & applyHanningWindow (long shift, long width, long startIndex, long endIndex)
 Multiplies the samples of the SampledSignal with a Hann function and stores back the results.

SampledSignal< T > & readFromFile (string file_name, long start, long end)
 Reads the values of samples from a binary file.

long size ()
 Returns size of the SampledSignal in samples.

t_Signal convertToDSPVector ()
 Converts the SampledSignal to the dsp::vector used by BOSS system.

void printTo (ostream &out)
 Prints the content of the signal in a formatted way to an output stream.


Private Attributes

vector< T > negative
vector< T > positive

Detailed Description

template<class T>
class SampledSignal< T >

Signal represented by samples.


Constructor & Destructor Documentation

template<class T>
SampledSignal< T >::SampledSignal long  size  ) 
 

SampledSignal constructor.

Parameters:
size Number of initial signal size in samples.

template<class T>
SampledSignal< T >::SampledSignal T *  data,
unsigned long  size
 

SampledSignal constructor.

Parameters:
data An array of data the signal is initialized from.
size Number of initial signal size in samples.

template<class T>
SampledSignal< T >::SampledSignal const SampledSignal< T > &  other,
long  start_index,
long  end_index
 

SampledSignal constructor.


Member Function Documentation

template<class T>
SampledSignal< T > & SampledSignal< T >::add SampledSignal< T > &  other,
long  shift
 

Adds samples of another signal to the samples of current signal.

template<class T>
SampledSignal< T > & SampledSignal< T >::applyHanningWindow long  shift,
long  width,
long  startIndex,
long  endIndex
 

Multiplies the samples of the SampledSignal with a Hann function and stores back the results.

template<class T>
T SampledSignal< T >::at long  index  )  const
 

Returns the sample value at index.

template<class T>
T & SampledSignal< T >::at long  index  ) 
 

Returns the sample value at index.

template<class T>
t_Signal SampledSignal< T >::convertToDSPVector  ) 
 

Converts the SampledSignal to the dsp::vector used by BOSS system.

template<class T>
SampledSignal< T > & SampledSignal< T >::multiply SampledSignal< T > &  other,
long  shift
 

Multiplies the samples with samples of another SampledSignal and stores back the results.

template<class T>
void SampledSignal< T >::printTo ostream &  out  ) 
 

Prints the content of the signal in a formatted way to an output stream.

template<class T>
SampledSignal< T > & SampledSignal< T >::readFromFile string  file_name,
long  start_index,
long  end_index
 

Reads the values of samples from a binary file.

template<class T>
long SampledSignal< T >::size  ) 
 

Returns size of the SampledSignal in samples.


Member Data Documentation

template<class T>
vector<T> SampledSignal< T >::negative [private]
 

template<class T>
vector<T> SampledSignal< T >::positive [private]
 


The documentation for this class was generated from the following files:
Generated on Tue Dec 20 23:14:41 2005 for BOSS by doxygen 1.3.6