root/library/tests/additive_generator.h @ 706

Revision 706, 0.9 kB (checked in by smidl, 15 years ago)

eol-native

  • Property svn:eol-style set to native
Line 
1/*!
2  \file
3  \brief Generating stress test agenda from random data.
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 ADDITIVE_GENERATOR_H
14#define ADDITIVE_GENERATOR_H
15
16#include "itpp_ext.h"
17#include "generator.h"
18
19/*! Iteratively adds squared random vector to a random matrix.
20 */
21class additive_generator : public generator {
22private:
23        itpp::mat a;
24        itpp::mat v2;
25        double lambda;
26
27public:
28        additive_generator() : lambda ( 0.5 ) { }
29
30        itpp::mat next();
31
32        //! Load from structure with elements:
33        //!  \code
34        //! { size = 7; // size (rows == cols) of the generated matrix
35        //!   lambda = 0.5; // weight of the added vector
36        //! }
37        //! \endcode
38        //! size is mandatory, lambda optional (with default as shown).
39        void from_setting ( const Setting &set );
40};
41
42#endif
Note: See TracBrowser for help on using the browser.