Revision 1064, 1.3 kB
(checked in by mido, 14 years ago)
|
astyle applied all over the library
|
-
Property svn:eol-style set to
native
|
Line | |
---|
1 | /*! |
---|
2 | \file |
---|
3 | \brief Agenda item format for stress tests of BDM matrices. |
---|
4 | \author Vaclav Barta. |
---|
5 | |
---|
6 | ----------------------------------- |
---|
7 | BDM++ - C++ library for Bayesian Decision Making under Uncertainty |
---|
8 | |
---|
9 | Using IT++ for numerical operations |
---|
10 | ----------------------------------- |
---|
11 | */ |
---|
12 | |
---|
13 | #ifndef SQUARE_MAT_POINT_H |
---|
14 | #define SQUARE_MAT_POINT_H |
---|
15 | |
---|
16 | #include "itpp_ext.h" |
---|
17 | #include "bdmroot.h" |
---|
18 | #include "base/user_info.h" |
---|
19 | |
---|
20 | /*! Testing matrix operations needs one square symmetrical matrix, one |
---|
21 | random vector and one random scalar. |
---|
22 | */ |
---|
23 | class square_mat_point : public bdm::root { |
---|
24 | private: |
---|
25 | itpp::mat matrix; |
---|
26 | itpp::vec vector; |
---|
27 | double scalar; |
---|
28 | |
---|
29 | public: |
---|
30 | square_mat_point() : scalar ( 0 ) { } |
---|
31 | |
---|
32 | itpp::mat get_matrix() const { |
---|
33 | return matrix; |
---|
34 | } |
---|
35 | |
---|
36 | itpp::vec get_vector() const { |
---|
37 | return vector; |
---|
38 | } |
---|
39 | |
---|
40 | double get_scalar() const { |
---|
41 | return scalar; |
---|
42 | } |
---|
43 | |
---|
44 | void set_parameters ( const itpp::mat &m, const itpp::vec &v, double s ) { |
---|
45 | matrix = m; |
---|
46 | vector = v; |
---|
47 | scalar = s; |
---|
48 | } |
---|
49 | |
---|
50 | //! Load from structure with elements: |
---|
51 | //! \code |
---|
52 | //! { matrix = ( "matrix", ... |
---|
53 | //! vector = [ ... |
---|
54 | //! scalar = ... |
---|
55 | //! } |
---|
56 | //! \endcode |
---|
57 | //! All elements are mandatory. |
---|
58 | void from_setting ( const Setting &set ); |
---|
59 | |
---|
60 | void to_setting ( Setting &set ) const; |
---|
61 | }; |
---|
62 | UIREGISTER ( square_mat_point ); |
---|
63 | |
---|
64 | #endif |
---|