libeblearn
|
#include <ebl_states.h>
Public Member Functions | |
mstate () | |
Empty constructor. | |
mstate (const mstate< Tstate > &other, intg dims, intg nstates=-1) | |
mstate (const mstate< Tstate > &other) | |
Construct an mstate with the exact same elements as ms. | |
virtual | ~mstate () |
Destructor. | |
virtual void | clear_x () |
Clears x field of all states. | |
virtual void | clear_dx () |
Clears dx field of all states. | |
virtual void | clear_ddx () |
Clears ddx field of all states. | |
virtual void | copy (mstate< Tstate > &cpy) |
Copy mstate 'cpy' into internal buffers. | |
template<typename T > | |
void | copy (midx< T > &cpy) |
Copy matrices 'cpy' into internal 'x' buffers. | |
template<typename T > | |
midx< T > | copy () |
Returns a matrix pointing to internal 'x' buffers. | |
virtual mstate< Tstate > | narrow (intg size, intg offset) |
Returns an mstate of size 'size' starting at 'offset' in current vector. | |
virtual mstate< Tstate > | narrow (int dimension, intg size, intg offset) |
Not implemented. | |
virtual mstate< Tstate > | narrow (midxdim ®ions) |
Narrows this multi-state given multiple input 'regions'. | |
virtual mstate< Tstate > | narrow_max (mfidxdim ®ions) |
template<class T > | |
void | get_midx (mfidxdim ®ions, midx< T > &all) |
template<class T > | |
void | get_max_midx (mfidxdim ®ions, midx< T > &all) |
template<class T > | |
void | get_padded_midx (mfidxdim ®ions, midx< T > &all) |
virtual void | resize (mstate< Tstate > &s2, uint nmax=0) |
template<class Tstate2 > | |
void | resize (mstate< Tstate2 > &other) |
virtual idxdim & | get_idxdim0 () |
Returns dimensions of first state. | |
Protected Attributes | |
svector< Tstate >::iterator | it |
A class that stores multiple states. Use regular STL vector accessors to access states.
ebl::mstate< Tstate >::mstate | ( | const mstate< Tstate > & | other, |
intg | dims, | ||
intg | nstates = -1 |
||
) |
This constructor initializes the same number of states as 'other', with the same number of dimensions for each state, and sets all these dimensions to 'dims'.
nstates | If >= 0, limit the number of states to 'nstates', otherwise allocate the same number of states as 'ms'. |
void ebl::mstate< Tstate >::get_max_midx | ( | mfidxdim & | regions, |
midx< T > & | all | ||
) |
Narrows this multi-state's x buffer given multiple input 'regions' to the maximum possible region (output may be smaller than requested regions) and puts result in multi-idx 'all'.
void ebl::mstate< Tstate >::get_midx | ( | mfidxdim & | regions, |
midx< T > & | all | ||
) |
Narrows this multi-state's x buffer given multiple input 'regions' and puts result in multi-idx 'all'.
void ebl::mstate< Tstate >::get_padded_midx | ( | mfidxdim & | regions, |
midx< T > & | all | ||
) |
Narrows this multi-state's x buffer given multiple input 'regions' and pad areas that do not overlap, then puts result in multi-idx 'all'.
mstate< Tstate > ebl::mstate< Tstate >::narrow_max | ( | mfidxdim & | regions | ) | [virtual] |
Narrows this multi-state given multiple input 'regions' to the maximum possible region (output may be smaller than requested regions).
void ebl::mstate< Tstate >::resize | ( | mstate< Tstate > & | s2, |
uint | nmax = 0 |
||
) | [virtual] |
Resize to have the same number of states with the same dimensions as s2.
nmax | If > 0, limit the number of states to min(s2.size(), nmax). |
void ebl::mstate< Tstate >::resize | ( | mstate< Tstate2 > & | other | ) |
Resizes this mstate given another 'other' mstate. This makes sure this mstate has the same number of states as 'other', and that each state has the same order as in 'other'. It otherwise allocates the correct number of states of the correct orders but with dimensions of size 1. This does not resize each state to the same dimension sizes as 'other'.