State of a spectral sequence. More...
#include <Oracle_label.hpp>
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. |
State of a spectral sequence.
Definition at line 150 of file Oracle_label.hpp.
O_spectral::O_spectral | ( | ) |
Default constructor.
Pitch is set to 60, energy to 0 and the list of coeff is an empty list.
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).
Definition at line 205 of file Oracle_label.cpp.
bool O_spectral::operator== | ( | const O_spectral & | other | ) | const |
Compare two states based on the spectral coefficients excluding the energy (first coefficient).
Definition at line 263 of file Oracle_label.cpp.
void O_spectral::set_coeffs | ( | list< float > & | coeffin | ) |
Set spectral coefficients of the state
Definition at line 253 of file Oracle_label.cpp.