WoMax Documentation OMax Logo

O_spectral Class Reference
[Data Sequence structure]

State of a spectral sequence. More...

#include <Oracle_label.hpp>

Inheritance diagram for O_spectral:
Inheritance graph
[legend]
Collaboration diagram for O_spectral:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Constructors & Desctructors



 O_spectral ()
 Default constructor.
 O_spectral (int, list< float > &, int=0, int=0, int=0, int=0, int=0)
 Create a spectral state from data.
 O_spectral (const O_spectral &)
 Copy constructor.
 ~O_spectral ()
 Standard destructor.
Set & Get



int get_pitch ()
 Return the pitch of the state.
void set_pitch (int)
 Set the pitch of the state.
float get_energy ()
 Return the energy of the state.
void set_energy (float)
 Set the energy of the state.
void set_energy (list< float > &)
 Set the energy of the state from the list of spectral coefficients.
list< float > get_coeffs ()
 Returns all the spectral coefficients of the state (first one is always energy).
void set_coeffs (list< float > &)

Operators Overload



bool operator== (const O_spectral &) const
 Compare two states based on the spectral coefficients excluding the energy (first coefficient).
ostream & operator<< (ostream &, const O_spectral &)
 Output data on a standard stream.

Detailed Description

State of a spectral sequence.

Definition at line 150 of file Oracle_label.hpp.


Constructor & Destructor Documentation

O_spectral::O_spectral (  ) 

Default constructor.

Pitch is set to 60, energy to 0 and the list of coeff is an empty list.

Remarks:
Calls the O_label default constructor

Definition at line 197 of file Oracle_label.cpp.

O_spectral::O_spectral ( int  pitchin,
list< float > &  coeffin,
int  statenbin = 0,
int  bufferefin = 0,
int  durationin = 0,
int  phrasein = 0,
int  sectionin = 0 
)

Create a spectral state from data.

Pitch is set to pitchin, if a non-empty list is given, energy is set to the first float of the list and coeffs is a copy of the input list (including the first coeff).

Remarks:
All the following arguments are passed to the O_label constructor

Definition at line 205 of file Oracle_label.cpp.


Member Function Documentation

bool O_spectral::operator== ( const O_spectral other  )  const

Compare two states based on the spectral coefficients excluding the energy (first coefficient).

Returns:
The (lazy) pairwise comparison of the spectral coefficients excluding the first one (energy)
Remarks:
Returns FALSE if the number of coefficients differs

Definition at line 263 of file Oracle_label.cpp.

void O_spectral::set_coeffs ( list< float > &  coeffin  ) 

Set spectral coefficients of the state

Remarks:
Set energy as the first coefficient of the list overwriting previous energy value

Definition at line 253 of file Oracle_label.cpp.


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

Generated on 16 Mar 2010 for Benjamin Lévy by  doxygen 1.6.1