ATSuite C++  v1.0
Scientific C++ routines originally developed by Alexis Tantet
Public Member Functions | Public Attributes | List of all members
transferOperator Class Reference

Transfer operator class. More...

#include <transferOperator.hpp>

Public Member Functions

 transferOperator ()
 Default constructor.
 
 transferOperator (size_t gridSize)
 Empty constructor allocating for grid size.
 
 transferOperator (const gsl_matrix_uint *, size_t)
 Constructor from the membership matrix. More...
 
 transferOperator (const gsl_vector_uint *, size_t)
 Constructor from membership matrix and lag.
 
 transferOperator (const gsl_matrix *, const gsl_matrix *, const Grid *)
 Constructor from initial and final states for a given grid. More...
 
 transferOperator (const gsl_matrix *, const Grid *, size_t)
 Constructor from a long trajectory for a given grid and lag. More...
 
 ~transferOperator ()
 Destructor. More...
 
int printForwardTransition (const char *, const char *)
 Print forward transition matrix to file in compressed matrix format. More...
 
int printBackwardTransition (const char *, const char *)
 Print backward transition matrix to file in compressed matrix format. More...
 
int printInitDist (const char *, const char *)
 Print initial distribution to file. More...
 
int printFinalDist (const char *, const char *)
 Print final distribution to file. More...
 

Public Attributes

size_t N
 Size of the grid.
 
SpMatCSRP
 Forward transition matrix.
 
SpMatCSRQ
 Backward transition matrix.
 
gsl_vector * initDist
 Initial distribution.
 
gsl_vector * finalDist
 Final distribution.
 

Detailed Description

Transfer operator class including the forward and backward transition matrices and the initial and final distributions calculated from data. The constructors are based on membership matrices with the first column giving the box to which belong the initial state of trajectories and the second column the box to which belong the final state of trajectories. The initial and final states can also be directly given as to matrices with each row giving a state. Finally, transferOperator can also be constructed from a single long trajectory and a given lag. Then, a membership vector is first calculated, assigning each realization to a box, from which the membership matrix can be calculated for the lag given.

Definition at line 102 of file transferOperator.hpp.

Constructor & Destructor Documentation

transferOperator::transferOperator ( const gsl_matrix_uint *  gridMem,
size_t  gridSize 
)

Construct transferOperator by calculating the forward and backward transition matrices and distributions from the grid membership matrix.

Parameters
[in]gridMemGSL grid membership matrix.
[in]gridSizeNumber of grid boxes.

Definition at line 173 of file transferOperator.hpp.

transferOperator::transferOperator ( const gsl_matrix *  initStates,
const gsl_matrix *  finalStates,
const Grid grid 
)

Construct transferOperator by calculating the forward and backward transition matrices and distributions from the initial and final states of trajectories.

Parameters
[in]initStatesGSL matrix of initial states.
[in]finalStatesGSL matrix of final states.
[in]gridPointer to Grid object.

Definition at line 192 of file transferOperator.hpp.

References getGridMemMatrix(), and Grid::N.

transferOperator::transferOperator ( const gsl_matrix *  states,
const Grid grid,
size_t  tauStep 
)

Construct transferOperator calculating the forward and backward transition matrices and distributions from a single long trajectory, for a given grid and lag.

Parameters
[in]statesGSL matrix of states for each time step.
[in]gridPointer to Grid object.
[in]tauStepLag used to calculate the transitions.

Definition at line 221 of file transferOperator.hpp.

References getGridMemMatrix(), and Grid::N.

transferOperator::~transferOperator ( )

Destructor of transferOperator: desallocate all pointers.

Definition at line 243 of file transferOperator.hpp.

Member Function Documentation

int transferOperator::printBackwardTransition ( const char *  path,
const char *  dataFormat = "%lf" 
)

Print backward transition matrix to file in compressed matrix format.

Parameters
[in]pathPath to the file in which to print.
[in]dataFormatFormat in which to print each element.
Returns
Status.

Definition at line 383 of file transferOperator.hpp.

References Eigen2Compressed().

int transferOperator::printFinalDist ( const char *  path,
const char *  dataFormat = "%lf" 
)

Print final distribution to file.

Parameters
[in]pathPath to the file in which to print.
[in]dataFormatFormat in which to print each element.
Returns
Status.

Definition at line 435 of file transferOperator.hpp.

References Grid::dim, Grid::gridBounds, Grid::N, and Grid::nx.

int transferOperator::printForwardTransition ( const char *  path,
const char *  dataFormat = "%lf" 
)

Print forward transition matrix to file in compressed matrix format.

Parameters
[in]pathPath to the file in which to print.
[in]dataFormatFormat in which to print each element.
Returns
Status.

Definition at line 357 of file transferOperator.hpp.

References Eigen2Compressed().

int transferOperator::printInitDist ( const char *  path,
const char *  dataFormat = "%lf" 
)

Print initial distribution to file.

Parameters
[in]pathPath to the file in which to print.
[in]dataFormatFormat in which to print each element.
Returns
Status.

Definition at line 409 of file transferOperator.hpp.


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