root/library/tests/size_generator.h @ 467

Revision 467, 0.9 kB (checked in by vbarta, 15 years ago)

added a program (square_mat_prep) to generate configurably random matrices, changed square_mat_stress to use the generated agenda

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 SIZE_GENERATOR_H
14#define SIZE_GENERATOR_H
15
16#include "itpp_ext.h"
17#include "generator.h"
18
19/*! Generates progressively larger random matrices.
20 */
21class size_generator : public generator
22{
23private:
24    int step;
25    int sz;
26
27public:
28    size_generator():step(7), sz(step) { }
29
30    itpp::mat next();
31
32    //! Load from structure with elements:
33    //!  \code
34    //! { size = 7; // size (rows == cols) of the first generated matrix
35    //!   step = 7; // how many times to increase the generated matrix in every iteration
36    //! }
37    //! \endcode
38    //! Both elements are optional, with defaults as shown.
39    void from_setting(const Setting &set);
40};
41
42#endif
Note: See TracBrowser for help on using the browser.