root/library/tests/square_mat_point.h @ 477

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

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
19/*! Testing matrix operations needs one square symmetrical matrix, one
20  random vector and one random scalar.
21 */
22class square_mat_point : public bdm::root {
23private:
24        itpp::mat matrix;
25        itpp::vec vector;
26        double scalar;
27
28public:
29        square_mat_point() : scalar ( 0 ) { }
30
31        itpp::mat get_matrix() const {
32                return matrix;
33        }
34
35        itpp::vec get_vector() const {
36                return vector;
37        }
38
39        double get_scalar() const {
40                return scalar;
41        }
42
43        void set_parameters ( const itpp::mat &m, const itpp::vec &v, double s ) {
44                matrix = m;
45                vector = v;
46                scalar = s;
47        }
48
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;
60};
61
62#endif
Note: See TracBrowser for help on using the browser.