root/library/tests/loggers_test.cpp
@
384
| Revision 384, 481 bytes (checked in by mido, 16 years ago) | |
|---|---|
|
|
| Rev | Line | |
|---|---|---|
| [262] | 1 | |
| [384] | 2 | #include "base/loggers.h" |
| [87] | 3 | |
| [254] | 4 | using namespace bdm; |
| [87] | 5 | |
| 6 | //These lines are needed for use of cout and endl | |
| 7 | using std::cout; | |
| 8 | using std::endl; | |
| 9 | ||
| 10 | int main() | |
| 11 | { | |
| [89] | 12 | int i; |
| 13 | ||
| [162] | 14 | RV th = RV ( "{a b }"); |
| 15 | RV r = RV ( "{r }","2"); | |
| [87] | 16 | |
| [89] | 17 | dirfilelog L("exp/dirfile",10); |
| [87] | 18 | |
| [89] | 19 | int rid; |
| 20 | int thid; | |
| [87] | 21 | |
| [89] | 22 | rid=L.add(r,""); |
| 23 | thid=L.add(th,"th"); | |
| 24 | ||
| [87] | 25 | L.init(); |
| 26 | ||
| [89] | 27 | for (i=0; i<150; i++){ |
| 28 | L.logit(rid,vec_2((double)i,(double)(i+1))); | |
| 29 | L.logit(thid,vec_2((double)(100-i),(double)(i-50))); | |
| 30 | L.step(); | |
| 31 | } | |
| [162] | 32 | L.finalize(); |
| [87] | 33 | } |
Note: See TracBrowser
for help on using the browser.
