Edinburgh Speech Tools 2.4-release
 
Loading...
Searching...
No Matches
EST_DVector Class Reference

#include <include/EST_DMatrix.h>

Inheritance diagram for EST_DVector:
Collaboration diagram for EST_DVector:

Public Member Functions

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

Additional Inherited Members

- Public Attributes inherited from EST_TVector< T >
Tp_memory
 
unsigned int p_num_columns
 Visible shape.
 
unsigned int p_offset
 How to access the memory.
 
unsigned int p_column_step
 
bool p_sub_matrix
 
- Static Public Attributes inherited from EST_TVector< T >
static const Tdef_val = &def_val_item_ptr
 default value, used for filling matrix after resizing
 
static Terror_return = &error_return_item_ptr
 

Detailed Description

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

Definition at line 113 of file EST_DMatrix.h.

Constructor & Destructor Documentation

◆ EST_DVector() [1/3]

EST_DVector::EST_DVector ( int  n)
inline

Size constructor.

Definition at line 116 of file EST_DMatrix.h.

◆ EST_DVector() [2/3]

EST_DVector::EST_DVector ( const EST_DVector a)
inline

Copy constructor.

Definition at line 118 of file EST_DMatrix.h.

◆ EST_DVector() [3/3]

EST_DVector::EST_DVector ( )
inline

Default constructor.

Definition at line 120 of file EST_DMatrix.h.

Member Function Documentation

◆ operator*=() [1/2]

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

elementwise multiply

Definition at line 682 of file EST_DMatrix.cc.

◆ operator+=()

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

elementwise add

Definition at line 665 of file EST_DMatrix.cc.

◆ operator*=() [2/2]

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

elementwise multiply by scalar

Definition at line 696 of file EST_DMatrix.cc.

◆ operator/=()

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

elementwise divide by scalar

Definition at line 719 of file EST_DMatrix.cc.

◆ est_save()

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

Definition at line 762 of file EST_DMatrix.cc.

◆ save()

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

save vector to file filename.

Definition at line 728 of file EST_DMatrix.cc.

◆ load()

EST_read_status EST_DVector::load ( const EST_String filename)

load vector from file filename.

Definition at line 613 of file EST_DMatrix.cc.

◆ est_load()

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 549 of file EST_DMatrix.cc.


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