Simulation state which include only a matrix. More...
#include <matrix.h>
Public Member Functions | |
MatrixState (const Config &c) | |
void | assign (const StateBase &other) |
virtual void | show (std::ostream &strm, int level) const |
virtual bool | getArray (unsigned idx, ArrayInfo &Info) |
Introspect named parameter of the derived class. More... | |
virtual MatrixState * | clone () const |
Public Attributes | |
value_t | state |
Public Attributes inherited from StateBase | |
size_t | next_elem |
double | pos |
absolute longitudinal position at end of Element | |
Protected Member Functions | |
MatrixState (const MatrixState &o, clone_tag) | |
Protected Member Functions inherited from StateBase | |
StateBase (const Config &c) | |
StateBase (const StateBase &c, clone_tag) | |
For use in clone() | |
|
virtual |
virtual equivalent to operator=() Should only be used with another State originating from the same Machine from Machine::allocState() or clone().
Implements StateBase.
Definition at line 45 of file linear.cpp.
|
inlinevirtual |
|
virtual |
Introspect named parameter of the derived class.
idx | The index of the parameter |
Info | mailbox to be filled with information about this paramter |
To introspect call this with index increasing from zero until false is returned.
Sub-classes are required to maintain a fixed number of parameters. The same ArrayInfo::name should alwaysbe returned for a given index. Similarly ArrayInfo::ndim and ArrayInfo.type should not change.
ArrayInfo::ptr, ArrayInfo::dim, ArrayInfo::stride are allowed to change when the state is passed to Machine::propagate().
Therefore, if getArray() for an instance has returned true for some index, then a caller may assume that all future calls to getArray() for this instance will also return true. However, the caller must still re-call getArray() in future as the storage and sizes may have changed.
Reimplemented from StateBase.
Definition at line 59 of file linear.cpp.
|
virtual |
Print information about the state. level is a hint as to the verbosity expected by the caller.
Reimplemented from StateBase.
Definition at line 54 of file linear.cpp.