Rev | Line | |
---|
[2] | 1 | #ifdef STATISTICS |
---|
| 2 | |
---|
| 3 | #ifndef morpheo_behavioural_Statistics_test_if_save_cpp |
---|
| 4 | #define morpheo_behavioural_Statistics_test_if_save_cpp |
---|
| 5 | |
---|
| 6 | /* |
---|
| 7 | * $Id$ |
---|
| 8 | * |
---|
| 9 | * [ Description ] |
---|
| 10 | * |
---|
| 11 | */ |
---|
| 12 | |
---|
| 13 | #include "Behavioural/include/Statistics.h" |
---|
| 14 | |
---|
| 15 | namespace morpheo { |
---|
| 16 | namespace behavioural { |
---|
| 17 | |
---|
| 18 | template <class Counters, class Parameters_Counters> |
---|
| 19 | void Statistics::test_if_save(Counters ** & counters, Parameters_Counters parameters) |
---|
| 20 | { |
---|
| 21 | _period_current ++; |
---|
| 22 | |
---|
| 23 | // Test if allors a new counters ... |
---|
| 24 | if ( ((_nb_statistics == 0) && (_period_current >= _parameters_statistics._nb_cycle_before_begin)) || |
---|
| 25 | ((_nb_statistics > 0) && (_period_current >= _parameters_statistics._period_save )) ) |
---|
| 26 | { |
---|
| 27 | save<Counters,Parameters_Counters>(counters,parameters); |
---|
| 28 | _period_current = 0; |
---|
| 29 | } |
---|
| 30 | }; |
---|
| 31 | |
---|
| 32 | }; // end namespace behavioural |
---|
| 33 | }; // end namespace morpheo |
---|
| 34 | |
---|
| 35 | #endif |
---|
| 36 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.