CppAD: A C++ Algorithmic Differentiation Package 20110419
player< Base > Class Template Reference

Class used to store and play back an operation sequence recording. More...

List of all members.

Public Member Functions

 player (void)
 Default constructor.
 ~player (void)
 Destructor.
void operator= (const recorder< Base > &rec)
 Moving an operation sequence from a recorder to a player.
void operator= (const player &play)
 Copying an operation sequence from one player to another.
void Erase (void)
 Erase all information in an operation sequence player.
OpCode GetOp (size_t i) const
 Fetch an operator from the recording.
size_t GetVecInd (size_t i) const
 Fetch a VecAD index from the recording.
Base GetPar (size_t i) const
 Fetch a parameter from the recording.
const Base * GetPar (void) const
 Fetch entire parameter vector from the recording.
const char * GetTxt (size_t i) const
 Fetch a '\0' terminated string from the recording.
void ReplaceInd (size_t i, size_t value)
 Replace an argument index in the recording.
size_t num_rec_var (void) const
 Fetch number of variables in the recording.
size_t num_rec_op (void) const
 Fetch number of operators in the recording.
size_t num_rec_vecad_ind (void) const
 Fetch number of VecAD indices in the recording.
size_t num_rec_vecad_vec (void) const
 Fetch number of VecAD vectors in the recording.
size_t num_rec_op_arg (void) const
 Fetch number of argument indices in the recording.
size_t num_rec_par (void) const
 Fetch number of parameters in the recording.
size_t num_rec_text (void) const
 Fetch number of characters (representing strings) in the recording.
size_t Memory (void) const
 Fetch a rough measure of amount of memory used by the recording.
void start_forward (OpCode &op, const size_t *&op_arg, size_t &op_index, size_t &var_index)
 Start a play back of the recording during a forward sweep.
void next_forward (OpCode &op, const size_t *&op_arg, size_t &op_index, size_t &var_index)
 Fetch the next operator during a forward sweep.
void forward_csum (OpCode &op, const size_t *&op_arg, size_t &op_index, size_t &var_index)
 Correct next_forward return values when op == CSumOp.
size_t * forward_non_const_arg (void)
 Get a non-constant version of op_arg returned by previous next_forward.
void start_reverse (OpCode &op, const size_t *&op_arg, size_t &op_index, size_t &var_index)
 Start a play back of the recording during a reverse sweep.
void next_reverse (OpCode &op, const size_t *&op_arg, size_t &op_index, size_t &var_index)
 Fetch the next operator during a reverse sweep.
void reverse_csum (OpCode &op, const size_t *&op_arg, size_t &op_index, size_t &var_index)
 Correct next_reverse return values when op == CSumOp.

Private Attributes

size_t num_rec_var_
 Number of variables in the recording.
size_t num_rec_op_
 Number of operators in the recording.
OpCoderec_op_
 The operators in the recording.
size_t num_rec_vecad_ind_
 Number of VecAD indices in the recording.
size_t num_rec_vecad_vec_
 Number of VecAD vectors in the recording.
size_t * rec_vecad_ind_
 The VecAD indices in the recording.
size_t num_rec_op_arg_
 Number of operation arguments indices in the recording.
size_t * rec_op_arg_
 The operation argument indices in the recording.
size_t num_rec_par_
 Number of parameters in the recording.
Base * rec_par_
 The parameters in the recording.
size_t num_rec_text_
 Number of text characters in the recording.
char * rec_text_
 Character strings ('\0' terminated) in the recording.
OpCode op_
 Current operator.
size_t op_index_
 Index in recording corresponding to current operator.
size_t op_arg_
 Current offser of the argument indices in rec_op_arg_.
size_t var_index_
 Index for primary (last) variable corresponding to current operator.

Detailed Description

template<class Base>
class player< Base >

Class used to store and play back an operation sequence recording.

Template Parameters:
BaseThese were AD< Base > operations when recorded. Operations during playback are done using the type Base .

Definition at line 31 of file player.hpp.


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