Edinburgh Speech Tools  2.1-release
EST_DVector Class Reference

A vector class for double precision floating point numbers. EST_DVector x should be used instead of float *x wherever possible. More...

#include <include/EST_DMatrix.h>

Inheritance diagram for EST_DVector:
Collaboration diagram for EST_DVector:

Public Member Functions

 EST_DVector (int n)
 Size constructor. More...
 
 EST_DVector (const EST_DVector &a)
 Copy constructor. More...
 
 EST_DVector ()
 Default constructor. More...
 
EST_DVectoroperator*= (const EST_DVector &s)
 elementwise multiply More...
 
EST_DVectoroperator+= (const EST_DVector &s)
 elementwise add More...
 
EST_DVectoroperator*= (const double d)
 elementwise multiply by scalar More...
 
EST_DVectoroperator/= (const double d)
 elementwise divide by scalar More...
 
EST_write_status est_save (const EST_String &filename, const EST_String &type)
 
EST_write_status save (const EST_String &filename, const EST_String &type)
 save vector to file filename. More...
 
EST_read_status load (const EST_String &filename)
 load vector from file filename. More...
 
EST_read_status est_load (const EST_String &filename)
 Load from file in est format (binary/ascii defined in file itself) More...
 
- Public Member Functions inherited from EST_TSimpleVector< double >
 EST_TSimpleVector ()
 default constructor More...
 
 EST_TSimpleVector (const EST_TSimpleVector< double > &v)
 copy constructor More...
 
 EST_TSimpleVector (int n)
 "size" constructor More...
 
 EST_TSimpleVector (int n, double *memory, int offset=0, int free_when_destroyed=0)
 memory constructor More...
 
void resize (int n, int set=1)
 resize vector More...
 
EST_TSimpleVectoroperator= (const EST_TSimpleVector< double > &s)
 assignment operator More...
 
void copy_section (double *dest, int offset=0, int num=-1) const
 
void set_section (const double *src, int offset=0, int num=-1)
 
void zero (void)
 Fill entire array with 0 bits. More...
 
- Public Member Functions inherited from EST_TVector< double >
INLINE ssize_t vcell_pos (ssize_t c, ssize_t cs) const
 The memory access rule, in one place for easy reference. More...
 
INLINE ssize_t vcell_pos (ssize_t c) const
 
INLINE ssize_t vcell_pos_1 (ssize_t c) const
 
INLINE const double & fast_a_v (int c) const
 quick method for returning (x[n]) More...
 
INLINE double & fast_a_v (int c)
 
INLINE const double & fast_a_1 (int c) const
 
INLINE double & fast_a_1 (int c)
 
void set_values (const double *data, int step, int start_c, int num_c)
 Get and set values from array. More...
 
void get_values (double *data, int step, int start_c, int num_c) const
 
void copy (const EST_TVector< double > &a)
 private copy function, called from all other copying functions. More...
 
void copy_data (const EST_TVector< double > &a)
 just copy data, no resizing, no size check. More...
 
void just_resize (int new_cols, double **old_vals)
 resize the memory and reset the bounds, but don't set values. More...
 
void default_vals ()
 sets data and length to default values (0 in both cases). More...
 
 EST_TVector ()
 default constructor More...
 
 EST_TVector (const EST_TVector< double > &v)
 copy constructor More...
 
 EST_TVector (ssize_t n)
 "size" constructor - make vector of size n. More...
 
 EST_TVector (int, double *memory, int offset=0, int free_when_destroyed=0)
 construct from memory supplied by caller More...
 
 ~EST_TVector ()
 destructor. More...
 
void resize (ssize_t n, int set=1)
 
const double * memory () const
 
double * memory ()
 
void set_memory (double *buffer, int offset, ssize_t columns, int free_when_destroyed=0)
 
EST_TVectoroperator= (const EST_TVector &s)
 assignment operator More...
 
void fill (const double &v)
 Fill entire array will value v. More...
 
void empty ()
 Fill vector with default value. More...
 
int operator== (const EST_TVector &v) const
 is true if vectors are equal size and all elements are equal. More...
 
int operator!= (const EST_TVector &v) const
 is true if vectors are not equal size or a single elements isn't equal. More...
 
void copy_section (double *dest, int offset=0, int num=-1) const
 Copy data in and out. Subclassed by SimpleVector for speed. More...
 
void set_section (const double *src, int offset=0, int num=-1)
 
void sub_vector (EST_TVector< double > &sv, int start_c=0, int len=-1)
 Create a sub vector. More...
 
void integrity () const
 
INLINE ssize_t num_columns () const
 number of items in vector. More...
 
INLINE ssize_t length () const
 number of items in vector. More...
 
INLINE ssize_t n () const
 number of items in vector. More...
 
INLINE const double & a_no_check (ssize_t n) const
 read-only const access operator: without bounds checking More...
 
INLINE double & a_no_check (ssize_t n)
 read/write non-const access operator: without bounds checking More...
 
INLINE const double & a_no_check_1 (ssize_t n) const
 read-only const access operator: without bounds checking More...
 
INLINE double & a_no_check_1 (ssize_t n)
 read/write non-const access operator: without bounds checking More...
 
const double & a_check (ssize_t n) const
 read-only const access operator: with bounds checking More...
 
double & a_check (ssize_t n)
 read/write non-const access operator: with bounds checking More...
 
const double & a (ssize_t n) const
 
double & a (ssize_t n)
 
const double & operator() (ssize_t n) const
 read-only const access operator: return reference to nth member More...
 
double & operator[] (ssize_t n)
 read/write non const access operator: return reference to nth member More...
 

Additional Inherited Members

- Public Attributes inherited from EST_TVector< double >
double * p_memory
 
ssize_t p_num_columns
 Visible shape. More...
 
ssize_t p_offset
 How to access the memory. More...
 
ssize_t p_column_step
 
bool p_sub_matrix
 
- Static Public Attributes inherited from EST_TVector< double >
static const double * def_val
 default value, used for filling matrix after resizing More...
 
static double * error_return
 

Detailed Description

A vector class for double precision floating point numbers. EST_DVector x should be used instead of float *x wherever possible.

Definition at line 122 of file EST_DMatrix.h.

Constructor & Destructor Documentation

EST_DVector::EST_DVector ( int  n)
inline

Size constructor.

Definition at line 125 of file EST_DMatrix.h.

EST_DVector::EST_DVector ( const EST_DVector a)
inline

Copy constructor.

Definition at line 127 of file EST_DMatrix.h.

EST_DVector::EST_DVector ( )
inline

Default constructor.

Definition at line 129 of file EST_DMatrix.h.

Member Function Documentation

EST_DVector & EST_DVector::operator*= ( const EST_DVector s)

elementwise multiply

Definition at line 705 of file EST_DMatrix.cc.

EST_DVector & EST_DVector::operator+= ( const EST_DVector s)

elementwise add

Definition at line 688 of file EST_DMatrix.cc.

EST_DVector & EST_DVector::operator*= ( const double  d)

elementwise multiply by scalar

Definition at line 719 of file EST_DMatrix.cc.

EST_DVector & EST_DVector::operator/= ( const double  d)

elementwise divide by scalar

Definition at line 742 of file EST_DMatrix.cc.

EST_write_status EST_DVector::est_save ( const EST_String filename,
const EST_String type 
)

Definition at line 785 of file EST_DMatrix.cc.

EST_write_status EST_DVector::save ( const EST_String filename,
const EST_String type 
)

save vector to file filename.

Definition at line 751 of file EST_DMatrix.cc.

EST_read_status EST_DVector::load ( const EST_String filename)

load vector from file filename.

Definition at line 636 of file EST_DMatrix.cc.

EST_read_status EST_DVector::est_load ( const EST_String filename)

Load from file in est format (binary/ascii defined in file itself)

Definition at line 571 of file EST_DMatrix.cc.


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