Revision 717, 1.0 kB
(checked in by mido, 15 years ago)
|
clean up of the whole tests directory has just started
|
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 | */ |
---|
21 | class additive_generator : public generator { |
---|
22 | private: |
---|
23 | itpp::mat a; |
---|
24 | itpp::mat v2; |
---|
25 | double lambda; |
---|
26 | |
---|
27 | public: |
---|
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 |
---|