FLAME  devel
 All Classes Functions Variables Typedefs Enumerations Pages
matrix.h
1 #ifndef FLAME_STATE_MATRIX_HPP
2 #define FLAME_STATE_MATRIX_HPP
3 
4 #include <ostream>
5 
6 #include <boost/numeric/ublas/matrix.hpp>
7 #include <boost/numeric/ublas/storage.hpp>
8 
9 #include "../base.h"
10 
13 struct MatrixState : public StateBase
14 {
15  enum {maxsize=6};
16  enum param_t {
17  PS_X, PS_PX, PS_Y, PS_PY, PS_S, PS_PS
18  };
19 
20  MatrixState(const Config& c);
21  virtual ~MatrixState();
22 
23  void assign(const StateBase& other);
24 
25  typedef boost::numeric::ublas::matrix<double,
26  boost::numeric::ublas::row_major,
27  boost::numeric::ublas::bounded_array<double, maxsize*maxsize>
28  > value_t;
29 
30  virtual void show(std::ostream& strm, int level) const;
31 
32  value_t state;
33 
34  virtual bool getArray(unsigned idx, ArrayInfo& Info);
35 
36  virtual MatrixState* clone() const {
37  return new MatrixState(*this, clone_tag());
38  }
39 
40 protected:
41  MatrixState(const MatrixState& o, clone_tag);
42 };
43 
44 #endif // FLAME_STATE_MATRIX_HPP
Simulation state which include only a matrix.
Definition: matrix.h:13
void assign(const StateBase &other)
Definition: linear.cpp:45
virtual void show(std::ostream &strm, int level) const
Definition: linear.cpp:54
The abstract base class for all simulation state objects.
Definition: base.h:28
Associative configuration container.
Definition: config.h:66
Used with StateBase::getArray() to describe a single parameter.
Definition: base.h:48
virtual MatrixState * clone() const
Definition: matrix.h:36
Used with clone ctor.
Definition: base.h:134
virtual bool getArray(unsigned idx, ArrayInfo &Info)
Introspect named parameter of the derived class.
Definition: linear.cpp:59