Revision 477, 1.2 kB
(checked in by mido, 15 years ago)
|
panove, vite, jak jsem peclivej na upravu kodu.. snad se vam bude libit:) konfigurace je v souboru /system/astylerc
|
Rev | Line | |
---|
[468] | 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 | |
---|
| 19 | /*! Testing matrix operations needs one square symmetrical matrix, one |
---|
| 20 | random vector and one random scalar. |
---|
| 21 | */ |
---|
[477] | 22 | class square_mat_point : public bdm::root { |
---|
[468] | 23 | private: |
---|
[477] | 24 | itpp::mat matrix; |
---|
| 25 | itpp::vec vector; |
---|
| 26 | double scalar; |
---|
[468] | 27 | |
---|
| 28 | public: |
---|
[477] | 29 | square_mat_point() : scalar ( 0 ) { } |
---|
[468] | 30 | |
---|
[477] | 31 | itpp::mat get_matrix() const { |
---|
| 32 | return matrix; |
---|
| 33 | } |
---|
[468] | 34 | |
---|
[477] | 35 | itpp::vec get_vector() const { |
---|
| 36 | return vector; |
---|
| 37 | } |
---|
[468] | 38 | |
---|
[477] | 39 | double get_scalar() const { |
---|
| 40 | return scalar; |
---|
| 41 | } |
---|
[468] | 42 | |
---|
[477] | 43 | void set_parameters ( const itpp::mat &m, const itpp::vec &v, double s ) { |
---|
| 44 | matrix = m; |
---|
| 45 | vector = v; |
---|
| 46 | scalar = s; |
---|
| 47 | } |
---|
[468] | 48 | |
---|
[477] | 49 | //! Load from structure with elements: |
---|
| 50 | //! \code |
---|
| 51 | //! { matrix = ( "matrix", ... |
---|
| 52 | //! vector = [ ... |
---|
| 53 | //! scalar = ... |
---|
| 54 | //! } |
---|
| 55 | //! \endcode |
---|
| 56 | //! All elements are mandatory. |
---|
| 57 | void from_setting ( const Setting &set ); |
---|
| 58 | |
---|
| 59 | void to_setting ( Setting &set ) const; |
---|
[468] | 60 | }; |
---|
| 61 | |
---|
| 62 | #endif |
---|