root/library/tests/square_mat_point.h @ 1064

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