Edinburgh Speech Tools 2.4-release
EST_TSimpleVector< T > Class Template Reference

#include <include/EST_TSimpleVector.h>

Inheritance diagram for EST_TSimpleVector< T >:
Collaboration diagram for EST_TSimpleVector< T >:

Public Member Functions

 EST_TSimpleVector ()
 default constructor More...
 
 EST_TSimpleVector (const EST_TSimpleVector< T > &v)
 copy constructor More...
 
 EST_TSimpleVector (int n)
 "size" constructor More...
 
 EST_TSimpleVector (int n, T *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< T > &s)
 assignment operator More...
 
void copy_section (T *dest, int offset=0, int num=-1) const
 
void set_section (const T *src, int offset=0, int num=-1)
 
void zero (void)
 Fill entire array with 0 bits. More...
 
- 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. More...
 
INLINE unsigned int vcell_pos (unsigned int c) const
 
INLINE unsigned int vcell_pos_1 (unsigned int c) const
 
INLINE const T & fast_a_v (int c) const
 quick method for returning (x[n]) More...
 
INLINE T & fast_a_v (int c)
 
INLINE const T & fast_a_1 (int c) const
 
INLINE T & fast_a_1 (int c)
 
void set_values (const T *data, int step, int start_c, int num_c)
 Get and set values from array. More...
 
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. More...
 
void copy_data (const EST_TVector< T > &a)
 just copy data, no resizing, no size check. More...
 
void just_resize (int new_cols, T **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< T > &v)
 copy constructor More...
 
 EST_TVector (int n)
 "size" constructor - make vector of size n. More...
 
 EST_TVector (int, T *memory, int offset=0, int free_when_destroyed=0)
 construct from memory supplied by caller More...
 
 ~EST_TVector ()
 destructor. More...
 
void resize (int n, int set=1)
 
const T * memory () const
 
T * memory ()
 
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. More...
 
INLINE int length () const
 number of items in vector. More...
 
INLINE int n () const
 number of items in vector. More...
 
INLINE const T & a_no_check (int n) const
 read-only const access operator: without bounds checking More...
 
INLINE T & a_no_check (int n)
 read/write non-const access operator: without bounds checking More...
 
INLINE const T & a_no_check_1 (int n) const
 read-only const access operator: without bounds checking More...
 
INLINE T & a_no_check_1 (int n)
 read/write non-const access operator: without bounds checking More...
 
const T & a_check (int n) const
 read-only const access operator: with bounds checking More...
 
T & a_check (int n)
 read/write non-const access operator: with bounds checking More...
 
const T & a (int n) const
 
T & a (int n)
 
const T & operator() (int n) const
 read-only const access operator: return reference to nth member More...
 
T & operator[] (int n)
 read/write non const access operator: return reference to nth member More...
 
void set_memory (T *buffer, int offset, int columns, int free_when_destroyed=0)
 
EST_TVectoroperator= (const EST_TVector &s)
 assignment operator More...
 
void fill (const T &v)
 Fill entire array will value <parameter>v</parameter>. 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 (T *dest, int offset=0, int num=-1) const
 Copy data in and out. Subclassed by SimpleVector for speed. More...
 
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. More...
 
void integrity () const
 

Additional Inherited Members

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

Detailed Description

template<class T>
class EST_TSimpleVector< T >

A derived class from EST_TVector which is used for containing simple types, such as float or int.

Definition at line 52 of file EST_TSimpleVector.h.

Constructor & Destructor Documentation

◆ EST_TSimpleVector() [1/4]

template<class T >
EST_TSimpleVector< T >::EST_TSimpleVector ( )
inline

default constructor

Definition at line 58 of file EST_TSimpleVector.h.

◆ EST_TSimpleVector() [2/4]

template<class T >
EST_TSimpleVector< T >::EST_TSimpleVector ( const EST_TSimpleVector< T > &  v)

copy constructor

Definition at line 63 of file EST_TSimpleVector.cc.

◆ EST_TSimpleVector() [3/4]

template<class T >
EST_TSimpleVector< T >::EST_TSimpleVector ( int  n)
inline

"size" constructor

Definition at line 62 of file EST_TSimpleVector.h.

◆ EST_TSimpleVector() [4/4]

template<class T >
EST_TSimpleVector< T >::EST_TSimpleVector ( int  n,
T *  memory,
int  offset = 0,
int  free_when_destroyed = 0 
)
inline

memory constructor

Definition at line 64 of file EST_TSimpleVector.h.

Member Function Documentation

◆ resize()

template<class T >
void EST_TSimpleVector< T >::resize ( int  n,
int  set = 1 
)

resize vector

Definition at line 70 of file EST_TSimpleVector.cc.

◆ operator=()

template<class T >
EST_TSimpleVector< T > & EST_TSimpleVector< T >::operator= ( const EST_TSimpleVector< T > &  s)

assignment operator

Definition at line 138 of file EST_TSimpleVector.cc.

◆ copy_section()

template<class T >
void EST_TSimpleVector< T >::copy_section ( T *  dest,
int  offset = 0,
int  num = -1 
) const

Definition at line 99 of file EST_TSimpleVector.cc.

◆ set_section()

template<class T >
void EST_TSimpleVector< T >::set_section ( const T *  src,
int  offset = 0,
int  num = -1 
)

Definition at line 119 of file EST_TSimpleVector.cc.

◆ zero()

template<class T >
void EST_TSimpleVector< T >::zero ( void  )

Fill entire array with 0 bits.

Definition at line 144 of file EST_TSimpleVector.cc.


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