Last change
on this file since 119 was
81,
checked in by rosiere, 16 years ago
|
- Finish Environment (and test)
- Continue predictor_unit
- Add external tools
- svn keyword "Id" set
|
-
Property svn:executable set to
*
-
Property svn:keywords set to
Id
|
File size:
971 bytes
|
Rev | Line | |
---|
[71] | 1 | #ifdef STATISTICS |
---|
| 2 | #include "Behavioural/include/Stat_binary_tree.h" |
---|
| 3 | |
---|
| 4 | namespace morpheo { |
---|
| 5 | namespace behavioural { |
---|
| 6 | |
---|
| 7 | void Stat_binary_tree::insert_tree (Stat_binary_tree * tree) |
---|
| 8 | { |
---|
| 9 | tree->_root = this; |
---|
| 10 | |
---|
| 11 | if (_left == NULL) |
---|
| 12 | _left = tree; |
---|
| 13 | else |
---|
| 14 | if (_right == NULL) |
---|
| 15 | _right = tree; |
---|
| 16 | else |
---|
| 17 | throw(ERRORMORPHEO("Stat_binary_tree::insert_tree",_("This root is full (left and right don't NULL)."))); |
---|
| 18 | } |
---|
| 19 | |
---|
| 20 | Stat_binary_tree * Stat_binary_tree::insert_tree (counter_t cst) |
---|
| 21 | { |
---|
| 22 | Stat_binary_tree * tree = new Stat_binary_tree (cst); |
---|
| 23 | insert_tree (tree); |
---|
| 24 | return (tree); |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | Stat_binary_tree * Stat_binary_tree::insert_tree (counter_t * var) |
---|
| 28 | { |
---|
| 29 | Stat_binary_tree * tree = new Stat_binary_tree (var); |
---|
| 30 | insert_tree (tree); |
---|
| 31 | return (tree); |
---|
| 32 | } |
---|
| 33 | Stat_binary_tree * Stat_binary_tree::insert_tree (operator_t op ) |
---|
| 34 | { |
---|
| 35 | Stat_binary_tree * tree = new Stat_binary_tree (op); |
---|
| 36 | insert_tree (tree); |
---|
| 37 | return (tree); |
---|
| 38 | } |
---|
| 39 | }; |
---|
| 40 | }; |
---|
| 41 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.