libeblearn
ebl::bbstate_idx< T > Class Template Reference

#include <ebl_states.h>

Inheritance diagram for ebl::bbstate_idx< T >:
ebl::bstate_idx< T > ebl::fstate_idx< T > ebl::state ebl::parameter< T, bbstate_idx< T > > ebl::state_idxlooper< bbstate_idx< T > >

List of all members.

Public Member Functions

 bbstate_idx ()
 Constructs a bbstate_idx of order 0.
 bbstate_idx (intg s0)
 Constructs a bbstate_idx of order 1.
 bbstate_idx (intg s0, intg s1)
 Constructs a bbstate_idx of order 2.
 bbstate_idx (intg s0, intg s1, intg s2)
 Constructs a bbstate_idx of order 3.
 bbstate_idx (intg s0, intg s1, intg s2, intg s3, intg s4=-1, intg s5=-1, intg s6=-1, intg s7=-1)
 Constructor. A bbstate_idx can have up to 8 dimensions.
 bbstate_idx (const idxdim &d)
 Constructor. Use the order and dimensions contained in passed idxdim d.
 bbstate_idx (intg n, bbstate_idx< T > &fs)
 bbstate_idx (parameter< T, bbstate_idx< T > > *st)
 bbstate_idx (parameter< T, bbstate_idx< T > > *st, intg s0)
 bbstate_idx (parameter< T, bbstate_idx< T > > *st, intg s0, intg s1)
 bbstate_idx (parameter< T, bbstate_idx< T > > *st, intg s0, intg s1, intg s2)
 bbstate_idx (parameter< T, bbstate_idx< T > > *st, intg s0, intg s1, intg s2, intg s3, intg s4=-1, intg s5=-1, intg s6=-1, intg s7=-1)
 bbstate_idx (parameter< T, bbstate_idx< T > > *st, const idxdim &d)
 bbstate_idx (const idx< T > &x, const idx< T > &dx, const idx< T > &ddx)
virtual void clear ()
 clear x, dx and ddx
virtual void clear_ddx ()
 clear diag hessians ddx
virtual void resize (intg s0=-1, intg s1=-1, intg s2=-1, intg s3=-1, intg s4=-1, intg s5=-1, intg s6=-1, intg s7=-1)
 resize. The order cannot be changed with this.
virtual void resize (const idxdim &d)
 resize with dimensions contained in an idxdim. order cannot be changed.
virtual void resize1 (intg dimn, intg size)
virtual void resize_as (bbstate_idx &s)
virtual void resize_as_but1 (bbstate_idx< T > &s, intg fixed_dim)
bbstate_idx< T > select (int dimension, intg slice_index)
bbstate_idx< T > narrow (int dimension, intg size, intg offset)
bbstate_idx< T > make_copy ()
 make a new copy of self
virtual bbstate_idx< T > & operator= (const bbstate_idx< T > &other)
virtual void copy (bbstate_idx< T > &cpy)
 Copy state 'cpy' into internal buffers.
virtual void pretty ()
 Prints idx metadata.
virtual void print ()
 Prints all elements.

Detailed Description

template<typename T>
class ebl::bbstate_idx< T >

A class that stores a vector/tensor state.


Constructor & Destructor Documentation

template<typename T >
ebl::bbstate_idx< T >::bbstate_idx ( )

Constructs a bbstate_idx of order 0.

constructors from specific dimensions

template<typename T>
ebl::bbstate_idx< T >::bbstate_idx ( intg  n,
bbstate_idx< T > &  fs 
)

This constructor initializes each buffer to the same order as 'ms.x' but sets all dimensions to 'n'.

template<typename T>
ebl::bbstate_idx< T >::bbstate_idx ( parameter< T, bbstate_idx< T > > *  st)

constructors from specific dimensions using a bbparameter Constructs a bbstate_idx of order 0, by appending the bbstate_idx into the same Srg as the bbparameter passed as argument. This is useful for allocating multiple bbstate_idx inside a bbparameter. If st is null, it is just ignore and behaves as regular constructor.

template<typename T>
ebl::bbstate_idx< T >::bbstate_idx ( parameter< T, bbstate_idx< T > > *  st,
intg  s0 
)

Constructs a bbstate_idx of order 1, by appending the bbstate_idx into the same Srg as the bbparameter passed as argument. This is useful for allocating multiple bbstate_idx inside a bbparameter. If st is null, it is just ignore and behaves as regular constructor.

template<typename T>
ebl::bbstate_idx< T >::bbstate_idx ( parameter< T, bbstate_idx< T > > *  st,
intg  s0,
intg  s1 
)

Constructs a bbstate_idx of order 2, by appending the bbstate_idx into the same Srg as the bbparameter passed as argument. This is useful for allocating multiple bbstate_idx inside a bbparameter. If st is null, it is just ignore and behaves as regular constructor.

template<typename T>
ebl::bbstate_idx< T >::bbstate_idx ( parameter< T, bbstate_idx< T > > *  st,
intg  s0,
intg  s1,
intg  s2 
)

Constructs a bbstate_idx of order 3, by appending the bbstate_idx into the same Srg as the bbparameter passed as argument. This is useful for allocating multiple bbstate_idx inside a bbparameter. If st is null, it is just ignore and behaves as regular constructor.

template<typename T>
ebl::bbstate_idx< T >::bbstate_idx ( parameter< T, bbstate_idx< T > > *  st,
intg  s0,
intg  s1,
intg  s2,
intg  s3,
intg  s4 = -1,
intg  s5 = -1,
intg  s6 = -1,
intg  s7 = -1 
)

Constructs a bbstate_idx of order up to 8, by appending the bbstate_idx into the same Srg as the bbparameter passed as argument. This is useful for allocating multiple bbstate_idx inside a bbparameter. If st is null, it is just ignore and behaves as regular constructor.

template<typename T>
ebl::bbstate_idx< T >::bbstate_idx ( parameter< T, bbstate_idx< T > > *  st,
const idxdim &  d 
)

Constructs a bbstate_idx using the order and dimensions contained in passed idxdim d, by appending the bbstate_idx into the same Srg as the bbparameter passed as argument. This is useful for allocating multiple bbstate_idx inside a bbparameter. If st is null, it is just ignore and behaves as regular constructor.

template<typename T>
ebl::bbstate_idx< T >::bbstate_idx ( const idx< T > &  x,
const idx< T > &  dx,
const idx< T > &  ddx 
)

constructors from other bbstate_idx Constructs a bbstate_idx from a bbstate_idx's 3 internal idx Note: the data pointed to by idxs is not copied, we only create new idx pointing to the same data.


Member Function Documentation

template<typename T >
void ebl::bbstate_idx< T >::clear ( ) [virtual]

clear x, dx and ddx

clear methods

Reimplemented from ebl::bstate_idx< T >.

template<typename T >
bbstate_idx< T > ebl::bbstate_idx< T >::make_copy ( )

make a new copy of self

copy methods

Reimplemented from ebl::bstate_idx< T >.

template<typename T >
bbstate_idx< T > ebl::bbstate_idx< T >::narrow ( int  dimension,
intg  size,
intg  offset 
)

Same as idx::narrow(), applied to internal buffers. This returns a state_idx pointing to the same data as current state, but pointing to a slice of it.

Parameters:
dimensionThe dimension to slice.
slice_indexThe size of the slize to return.
offsetThe offset to start slicing.

Reimplemented from ebl::bstate_idx< T >.

template<typename T>
bbstate_idx< T > & ebl::bbstate_idx< T >::operator= ( const bbstate_idx< T > &  other) [virtual]

Assignment operator, involves assignment of internal idx (avoid using this in critical loops).

template<typename T >
void ebl::bbstate_idx< T >::pretty ( ) [virtual]

Prints idx metadata.

info printing methods

Reimplemented from ebl::bstate_idx< T >.

template<typename T >
void ebl::bbstate_idx< T >::resize ( intg  s0 = -1,
intg  s1 = -1,
intg  s2 = -1,
intg  s3 = -1,
intg  s4 = -1,
intg  s5 = -1,
intg  s6 = -1,
intg  s7 = -1 
) [virtual]

resize. The order cannot be changed with this.

resize methods

Reimplemented from ebl::bstate_idx< T >.

template<typename T >
void ebl::bbstate_idx< T >::resize1 ( intg  dimn,
intg  size 
) [virtual]

resize one dimension <dimn> with size <size>. The order cannot be changed.

Reimplemented from ebl::bstate_idx< T >.

template<typename T >
void ebl::bbstate_idx< T >::resize_as ( bbstate_idx< T > &  s) [virtual]

resizes this bbstate_idx with same sizes a <s>. Both bbstate_idx are required to have the same order.

template<typename T>
void ebl::bbstate_idx< T >::resize_as_but1 ( bbstate_idx< T > &  s,
intg  fixed_dim 
) [virtual]

same as resize_as but leave dimension <fixed_dim> untouched. Both bbstate_idx are required to have the same order.

template<typename T >
bbstate_idx< T > ebl::bbstate_idx< T >::select ( int  dimension,
intg  slice_index 
)

slicing methods Same as idx::select(), applied to internal buffers. This returns a state_idx pointing to the same data as current state, but pointing to a slice of it.

Parameters:
dimensionThe dimension to slice.
slice_indexThe slice to return.

slicing methods

Reimplemented from ebl::bstate_idx< T >.


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