Changeset 6141 for trunk/CONSENSUS_TREE/CT_ntree.cxx
- Timestamp:
- 14/08/09 16:29:27 (3 years ago)
- Files:
-
- 1 modified
-
trunk/CONSENSUS_TREE/CT_ntree.cxx (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/CONSENSUS_TREE/CT_ntree.cxx
r5725 r6141 67 67 68 68 69 /* build a new node and store the part tion p in it */69 /* build a new node and store the partition p in it */ 70 70 NT_NODE *new_ntnode(PART *p) 71 71 { … … 101 101 102 102 103 /* Initiali sation of the tree */103 /* Initialization of the tree */ 104 104 void ntree_init(void) 105 105 { 106 106 PART *r; 107 107 108 /* Destruct old Tree */108 /* Destruct old tree */ 109 109 del_tree(ntree); 110 /* Set Root = max. Patition */110 /* Set root = max. partition */ 111 111 ntree = NULL; 112 112 r=part_root(); … … 147 147 148 148 149 /* Construct a multitree under that constrain that it is poss sible for the tree150 be a bina erytree in the end. To enable this it is important to follow two149 /* Construct a multitree under that constrain that it is possible for the tree 150 be a binary tree in the end. To enable this it is important to follow two 151 151 ideas: 152 152 1. a son fits only under a father if the father has every bit set that the son 153 153 has plus it should be possible to insert as many sons as necessary to result 154 in a bina erytree154 in a binary tree 155 155 2. for any two brothers A,B: brotherA and brotherB == 0 */ 156 156 int ins_ntree(NT_NODE *tree, PART *newpart) … … 214 214 possible representations. ins_ntree do the hole work. If it fit in none 215 215 of them I delete the partition. 216 attention: The part tion is detruced afterwards.217 The tree is never empty, because it is init alised with a root */216 attention: The partition is destructed afterwards. 217 The tree is never empty, because it is initialized with a root */ 218 218 void insert_ntree(PART *part) 219 219 {
