Revision 477, 397 bytes
(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 | #include "size_generator.h" |
---|
2 | #include "base/user_info.h" |
---|
3 | |
---|
4 | using namespace itpp; |
---|
5 | using bdm::UI; |
---|
6 | |
---|
7 | void size_generator::from_setting ( const Setting &set ) { |
---|
8 | if ( set.exists ( "size" ) ) { |
---|
9 | UI::get ( sz, set, "size" ); |
---|
10 | } |
---|
11 | |
---|
12 | if ( set.exists ( "step" ) ) { |
---|
13 | UI::get ( step, set, "step" ); |
---|
14 | } |
---|
15 | } |
---|
16 | |
---|
17 | mat size_generator::next() { |
---|
18 | mat A0 = randu ( sz, sz ); |
---|
19 | mat A = A0 * A0.T(); |
---|
20 | sz *= step; |
---|
21 | return A; |
---|
22 | } |
---|