TTK
Loading...
Searching...
No Matches
FTMTreeUtils.cpp
Go to the documentation of this file.
1#include <FTMTree.h>
2#include <FTMTreeUtils.h>
3#include <iostream>
4
5void ttk::ftm::printTreesStats(std::vector<FTMTree_MT *> &trees) {
6 for(auto tree : trees)
7 tree->printTreeStats();
8}
9
10namespace ttk {
11 namespace ftm {
12
13 // --------------------
14 // Is
15 // --------------------
17 unsigned int const origin
18 = (unsigned int)this->getNode(nodeId)->getOrigin();
19 return origin != nullNodes && origin < this->getNumberOfNodes();
20 }
21
22 bool FTMTree_MT::isRoot(idNode nodeId) const {
23 return this->getNode(nodeId)->getNumberOfUpSuperArcs() == 0;
24 }
25
26 bool FTMTree_MT::isLeaf(idNode nodeId) const {
27 return this->getNode(nodeId)->getNumberOfDownSuperArcs() == 0;
28 }
29
30 bool FTMTree_MT::isNodeAlone(idNode nodeId) const {
31 return this->isRoot(nodeId) and this->isLeaf(nodeId);
32 }
33
35 idNode const treeRoot = this->getRoot();
36 return (unsigned int)this->getNode(treeRoot)->getOrigin() == treeRoot;
37 }
38
40 return this->getParentSafe(this->getNode(nodeId)->getOrigin()) != nodeId;
41 }
42
43 bool FTMTree_MT::isNodeMerged(idNode nodeId) const {
44 bool merged = this->isNodeAlone(nodeId)
45 or this->isNodeAlone(this->getNode(nodeId)->getOrigin());
46 auto nodeIdOrigin = this->getNode(nodeId)->getOrigin();
47 merged
48 = merged or nodeIdOrigin == this->getNode(nodeIdOrigin)->getOrigin();
49 return merged;
50 }
51
53 return nodeId >= this->getNumberOfNodes();
54 }
55
57 idNode const treeRoot = this->getRoot();
58 unsigned int cptNodeAlone = 0;
59 idNode otherNode = treeRoot;
60 for(unsigned int i = 0; i < this->getNumberOfNodes(); ++i)
61 if(this->isNodeAlone(i))
62 cptNodeAlone++;
63 else if(i != treeRoot)
64 otherNode = i;
65 // unsigned int origin = (unsigned
66 // int)tree->getNode(otherNode)->getOrigin();
67 idNode const treeRootOrigin = this->getNode(treeRoot)->getOrigin();
68 return (otherNode != treeRoot
69 and this->getNumberOfNodes() - cptNodeAlone == 2
70 and (treeRootOrigin == otherNode or treeRootOrigin == treeRoot));
71 /*return (otherNode != treeRoot and cptNodeAlone ==
72 tree->getNumberOfNodes()-2 and (origin == treeRoot or otherNode ==
73 origin));*/
74 }
75
76 // Do not normalize node is if root or son of a merged root
78 auto nodeIdParent = this->getParentSafe(nodeId);
79 return this->isRoot(nodeId)
80 or (this->isRoot(nodeIdParent)
81 and nodeIdParent
82 == (unsigned int)this->getNode(nodeIdParent)
83 ->getOrigin());
84 // and nodeIdOrigin == nodeIdParent) )
85 }
86
88 auto nodeOriginOrigin
89 = (unsigned int)this->getNode(this->getNode(nodeId)->getOrigin())
90 ->getOrigin();
91 return nodeOriginOrigin != nodeId;
92 }
93
94 // --------------------
95 // Get
96 // --------------------
98 for(idNode node = 0; node < this->getNumberOfNodes(); ++node)
99 if(this->isRoot(node) and !this->isLeaf(node))
100 return node;
101 return nullNodes;
102 }
103
105 if(!this->isRoot(nodeId)) {
106 // _ Nodes in merge trees should have only one parent
107 idSuperArc const arcId = this->getNode(nodeId)->getUpSuperArcId(0);
108 idNode const parentNodeId = this->getSuperArc(arcId)->getUpNodeId();
109 return parentNodeId;
110 }
111 return nodeId;
112 }
113
115 std::vector<idNode> &childrens) const {
116 childrens.clear();
117 for(idSuperArc i = 0;
118 i < this->getNode(nodeId)->getNumberOfDownSuperArcs(); ++i) {
119 idSuperArc const arcId = this->getNode(nodeId)->getDownSuperArcId(i);
120 childrens.push_back(this->getSuperArc(arcId)->getDownNodeId());
121 }
122 }
123
124 void FTMTree_MT::getLeavesFromTree(std::vector<idNode> &treeLeaves) const {
125 treeLeaves.clear();
126 for(idNode i = 0; i < this->getNumberOfNodes(); ++i) {
127 if(this->isLeaf(i) and !this->isRoot(i))
128 treeLeaves.push_back(i);
129 }
130 }
131
133 std::vector<idNode> leaves;
134 this->getLeavesFromTree(leaves);
135 return leaves.size();
136 }
137
139 int cpt = 0;
140 for(idNode i = 0; i < this->getNumberOfNodes(); ++i)
141 cpt += this->isNodeAlone(i) ? 1 : 0;
142 return cpt;
143 }
144
146 return this->getNumberOfNodes() - this->getNumberOfNodeAlone();
147 }
148
150 idNode node,
151 std::tuple<std::vector<idNode>, std::vector<idNode>> &res) const {
152 std::vector<idNode> branchOrigins, nonBranchOrigins;
153
154 idNode const nodeOrigin = this->getNode(node)->getOrigin();
155 idNode nodeParent = this->getParentSafe(nodeOrigin);
156 while(nodeParent != node) {
157 if(this->isBranchOrigin(nodeParent))
158 branchOrigins.push_back(nodeParent);
159 else
160 nonBranchOrigins.push_back(nodeParent);
161 nodeParent = this->getParentSafe(nodeParent);
162 }
163
164 res = std::make_tuple(branchOrigins, nonBranchOrigins);
165 }
166
168 std::vector<idNode> &branching,
169 std::vector<int> &branchingID,
170 std::vector<std::vector<idNode>> &nodeBranching) const {
171 branching = std::vector<idNode>(this->getNumberOfNodes());
172 branchingID = std::vector<int>(this->getNumberOfNodes(), -1);
173 nodeBranching
174 = std::vector<std::vector<idNode>>(this->getNumberOfNodes());
175 int branchID = 0;
176 std::queue<idNode> queue;
177 queue.emplace(this->getRoot());
178 while(!queue.empty()) {
179 idNode const node = queue.front();
180 queue.pop();
181 if(this->isLeaf(node))
182 continue;
183 auto nodeOrigin = this->getNode(node)->getOrigin();
184 idNode parentNodeOrigin = nodeOrigin;
185 while(parentNodeOrigin != node) {
186 branching[parentNodeOrigin] = node;
187 branchingID[parentNodeOrigin] = branchID;
188 nodeBranching[node].push_back(parentNodeOrigin);
189 parentNodeOrigin = this->getParentSafe(parentNodeOrigin);
190 }
191 if(this->isRoot(node)) {
192 branching[node] = node;
193 branchingID[node] = branchID;
194 }
195 ++branchID;
196 std::vector<idNode> children;
197 this->getChildren(node, children);
198 for(idNode const child : children)
199 queue.emplace(child);
200 }
201 }
202
203 void FTMTree_MT::getTreeBranching(std::vector<idNode> &branching,
204 std::vector<int> &branchingID) const {
205 std::vector<std::vector<idNode>> nodeBranching;
206 this->getTreeBranching(branching, branchingID, nodeBranching);
207 }
208
209 void FTMTree_MT::getAllRoots(std::vector<idNode> &roots) const {
210 roots.clear();
211 for(idNode node = 0; node < this->getNumberOfNodes(); ++node)
212 if(this->isRoot(node) and !this->isLeaf(node))
213 roots.push_back(node);
214 }
215
217 int noRoot = 0;
218 for(idNode node = 0; node < this->getNumberOfNodes(); ++node)
219 if(this->isRoot(node) and !this->isLeaf(node))
220 ++noRoot;
221 return noRoot;
222 }
223
225 return this->getNode(nodeId)->getNumberOfDownSuperArcs();
226 }
227
229 int maxDepth = 0;
230 std::queue<std::tuple<idNode, int>> queue;
231 queue.emplace(this->getRoot(), 0);
232 while(!queue.empty()) {
233 auto tup = queue.front();
234 queue.pop();
235 idNode const node = std::get<0>(tup);
236 int const depth = std::get<1>(tup);
237 maxDepth = std::max(maxDepth, depth);
238 std::vector<idNode> children;
239 this->getChildren(node, children);
240 for(idNode const child : children)
241 queue.emplace(child, depth + 1);
242 }
243 return maxDepth;
244 }
245
247 int level = 0;
248 auto root = this->getRoot();
249 int const noRoot = this->getNumberOfRoot();
250 if(noRoot != 1) {
251 std::stringstream ss;
252 ss << "problem, there is " << noRoot << " root(s)";
253 printErr(ss.str());
254 this->printTree();
255 }
256 if(this->isNodeAlone(nodeId))
257 return 0;
258 while(nodeId != root) {
259 nodeId = this->getParentSafe(nodeId);
260 ++level;
261 }
262 return level;
263 }
264
265 void FTMTree_MT::getAllNodeLevel(std::vector<int> &allNodeLevel) const {
266 allNodeLevel = std::vector<int>(this->getNumberOfNodes());
267 std::queue<std::tuple<idNode, int>> queue;
268 queue.emplace(this->getRoot(), 0);
269 while(!queue.empty()) {
270 auto tup = queue.front();
271 queue.pop();
272 idNode const node = std::get<0>(tup);
273 int const level = std::get<1>(tup);
274 allNodeLevel[node] = level;
275 std::vector<idNode> children;
276 this->getChildren(node, children);
277 for(idNode const child : children)
278 queue.emplace(child, level + 1);
279 }
280 }
281
283 std::vector<std::vector<idNode>> &levelToNode) const {
284 std::vector<int> allNodeLevel;
285 this->getAllNodeLevel(allNodeLevel);
286 int const maxLevel
287 = *max_element(allNodeLevel.begin(), allNodeLevel.end());
288 levelToNode = std::vector<std::vector<idNode>>(maxLevel + 1);
289 for(unsigned int i = 0; i < allNodeLevel.size(); ++i) {
290 levelToNode[allNodeLevel[i]].push_back(i);
291 }
292 }
293
294 void
295 FTMTree_MT::getBranchSubtree(std::vector<idNode> &branching,
296 idNode branchRoot,
297 std::vector<idNode> &branchSubtree) const {
298 branchSubtree.clear();
299 std::queue<idNode> queue;
300 queue.push(branchRoot);
301 while(!queue.empty()) {
302 idNode const node = queue.front();
303 queue.pop();
304
305 if(branching[node] != branchRoot
306 and this->getParentSafe(node) == branchRoot and node != branchRoot)
307 continue;
308
309 branchSubtree.push_back(node);
310 std::vector<idNode> children;
311 this->getChildren(node, children);
312 for(idNode const child : children)
313 queue.push(child);
314 }
315 }
316
317 // --------------------
318 // Persistence
319 // --------------------
321 std::vector<std::vector<idNode>> &treeMultiPers) const {
322 treeMultiPers
323 = std::vector<std::vector<idNode>>(this->getNumberOfNodes());
324 for(unsigned int i = 0; i < this->getNumberOfNodes(); ++i)
325 if(this->isLeaf(i) and this->isNodeOriginDefined(i)
326 and not this->isNodeAlone(i)
327 and this->getNode(this->getNode(i)->getOrigin())->getOrigin()
328 != (int)i)
329 treeMultiPers[this->getNode(i)->getOrigin()].push_back(i);
330 }
331
332 // --------------------
333 // Set
334 // --------------------
335 void FTMTree_MT::setParent(idNode nodeId, idNode newParentNodeId) {
336 this->deleteParent(nodeId);
337 this->makeSuperArc(nodeId, newParentNodeId);
338 }
339
340 // --------------------
341 // Delete
342 // --------------------
343 // Delete node by keeping subtree
345 if(this->isRoot(nodeId) and !this->isLeaf(nodeId))
346 printErr("deletion of root!");
347
348 idNode const parentNodeId = this->getParentSafe(nodeId);
349 if(!this->isRoot(nodeId)) {
350 // Delete down arc from parent node
351 // _ Nodes in trees should have only one parent
352 idSuperArc const nodeArcId = this->getNode(nodeId)->getUpSuperArcId(0);
353 this->getNode(parentNodeId)->removeDownSuperArc(nodeArcId);
354 }
355 // Delete up arc from child nodes
356 for(idSuperArc i = 0;
357 i < this->getNode(nodeId)->getNumberOfDownSuperArcs(); ++i) {
358 idSuperArc const arcId = this->getNode(nodeId)->getDownSuperArcId(i);
359 idNode const childNodeId = this->getSuperArc(arcId)->getDownNodeId();
360 this->getNode(childNodeId)->removeUpSuperArc(arcId);
361 if(!this->isRoot(nodeId))
362 this->makeSuperArc(childNodeId, parentNodeId);
363 }
364 // Reset deleted node
365 this->getNode(nodeId)->clearDownSuperArcs();
366 this->getNode(nodeId)->clearUpSuperArcs();
367 }
368
369 void FTMTree_MT::deleteIthUpArc(idNode nodeId, int arcIth) {
370 idSuperArc const nodeArcId
371 = this->getNode(nodeId)->getUpSuperArcId(arcIth);
372 // Delete down arc from old parent
373 idNode const parentNodeId = this->getSuperArc(nodeArcId)->getUpNodeId();
374 this->getNode(parentNodeId)->removeDownSuperArc(nodeArcId);
375 // Delete up arc from node
376 this->getNode(nodeId)->removeUpSuperArc(nodeArcId);
377 }
378
380 if(!this->isRoot(nodeId)) {
381 // _ Nodes in trees should have only one parent
382 this->deleteIthUpArc(nodeId, 0);
383 }
384 }
385
387 std::queue<idNode> queue;
388 queue.push(nodeId);
389 while(!queue.empty()) {
390 idNode const node = queue.front();
391 queue.pop();
392 std::vector<idNode> children;
393 this->getChildren(node, children);
394 for(idNode const child : children)
395 queue.push(child);
396 this->deleteNode(node);
397 }
398 }
399
400 // --------------------
401 // Create/Delete/Modify Tree
402 // --------------------
404 // Add Nodes
405 for(unsigned int i = 0; i < tree->getNumberOfNodes(); ++i)
406 this->makeNode(i);
407 for(unsigned int i = 0; i < tree->getNumberOfNodes(); ++i)
408 this->getNode(i)->setOrigin(tree->getNode(i)->getOrigin());
409
410 // Add Arcs
411 for(unsigned int i = 0; i < tree->getNumberOfNodes(); ++i) {
412 for(unsigned int j = 0;
413 j < tree->getNode(i)->getNumberOfDownSuperArcs(); ++j) {
414 auto superArcId = tree->getNode(i)->getDownSuperArcId(j);
415 this->makeSuperArc(tree->getSuperArc(superArcId)->getDownNodeId(), i);
416 }
417 }
418 }
419
420 // --------------------
421 // Utils
422 // --------------------
423 void FTMTree_MT::printNodeSS(idNode node, std::stringstream &ss) const {
424 ss << "(" << node << ") \\ ";
425
426 std::vector<idNode> children;
427 this->getChildren(node, children);
428 for(idNode const child : children)
429 ss << "+" << child << " ";
430
431 if(!this->isRoot(node))
432 ss << " / +" << this->getParentSafe(node);
433 ss << std::endl;
434 }
435
436 std::stringstream FTMTree_MT::printSubTree(idNode subRoot) const {
437 std::stringstream ss;
438 ss << "Nodes----------" << std::endl;
439 std::queue<idNode> queue;
440 queue.push(subRoot);
441 while(!queue.empty()) {
442 idNode node = queue.front();
443 queue.pop();
444
445 printNodeSS(node, ss);
446
447 std::vector<idNode> children;
448 this->getChildren(node, children);
449 for(idNode child : children)
450 queue.push(child);
451 }
452 return ss;
453 }
454
455 std::stringstream FTMTree_MT::printTree(bool doPrint) const {
456 std::stringstream ss;
457 std::vector<idNode> allRoots;
458 this->getAllRoots(allRoots);
459 if(allRoots.size() != 1)
460 ss << allRoots.size() << " roots" << std::endl;
461 for(unsigned int i = 0; i < allRoots.size(); ++i) {
462 if(allRoots.size() != 1)
463 ss << i << " _ ";
464 ss << this->printSubTree(allRoots[i]).str();
465 }
466 if(allRoots.size() == 0)
467 for(unsigned int i = 0; i < this->getNumberOfNodes(); ++i)
468 // if(not tree->isNodeAlone(i))
469 printNodeSS(i, ss);
470
471 if(doPrint)
472 printMsg(ss.str());
473 return ss;
474 }
475
476 std::stringstream FTMTree_MT::printTreeStats(bool doPrint) const {
477 auto noNodesT = this->getNumberOfNodes();
478 auto noNodes = this->getRealNumberOfNodes();
479 std::stringstream ss;
480 ss << "tree [node: " << noNodes << " / " << noNodesT;
481 ss << ", depth: " << this->getTreeDepth() << "]";
482 if(doPrint)
483 printMsg(ss.str());
484 return ss;
485 }
486
487 std::stringstream
489 std::stringstream ss;
490 std::vector<std::vector<idNode>> vec;
492 for(unsigned int i = 0; i < vec.size(); ++i)
493 if(vec[i].size() != 0) {
494 ss << i << " : ";
495 for(auto t : vec[i])
496 ss << t << " ";
497 ss << std::endl;
498 }
499
500 if(doPrint)
501 printMsg(ss.str());
502 return ss;
503 }
504
505 // --------------------
506 // Make tree utils
507 // --------------------
509 ftm::idNode treeRoot = 0;
510 for(unsigned int i = 0; i < tree->getNumberOfNodes(); ++i) {
511 if(tree->getNode(i)->getNumberOfDownSuperArcs() != 0
512 and tree->getNode(i)->getNumberOfUpSuperArcs() == 0)
513 treeRoot = i;
514 }
515
516 for(unsigned int i = 0; i < tree->getNumberOfNodes(); ++i)
517 if(tree->getNode(i)->getNumberOfUpSuperArcs() > 1) {
518 ftm::idNode lowestParent = std::numeric_limits<ftm::idNode>::max();
519 for(long unsigned int j = 0;
520 j < tree->getNode(i)->getNumberOfUpSuperArcs(); ++j) {
521 auto tParent
522 = tree->getSuperArc(tree->getNode(i)->getUpSuperArcId(j))
523 ->getUpNodeId();
524 lowestParent = (lowestParent > tParent) ? tParent : lowestParent;
525 }
526
527 for(long unsigned int j = 0;
528 j < tree->getNode(i)->getNumberOfUpSuperArcs(); ++j) {
529 ftm::idSuperArc const nodeArcId
530 = tree->getNode(i)->getUpSuperArcId(j);
531 auto tParent = tree->getSuperArc(nodeArcId)->getUpNodeId();
532 if(tParent != lowestParent) {
533
534 if(tParent == treeRoot) {
535 for(long unsigned int k = 0;
536 k < tree->getNode(i)->getNumberOfDownSuperArcs(); ++k) {
537 ftm::idSuperArc const nodeArcId2
538 = tree->getNode(i)->getDownSuperArcId(k);
539 auto tChildren
540 = tree->getSuperArc(nodeArcId2)->getDownNodeId();
541 if(tChildren > i) {
542 tree->getNode(i)->removeDownSuperArc(nodeArcId2);
543 tree->getNode(tChildren)->removeUpSuperArc(nodeArcId2);
544 tree->makeSuperArc(tChildren, treeRoot);
545 break;
546 }
547 }
548 }
549
550 // Delete down arc from old parent
551 tree->getNode(tParent)->removeDownSuperArc(nodeArcId);
552 // Delete up arc from node
553 tree->getNode(i)->removeUpSuperArc(nodeArcId);
554 }
555 }
556 }
557 }
558
560 for(unsigned int i = 0; i < tree->getNumberOfNodes(); ++i) {
561 for(unsigned int j = 0; j < tree->getNode(i)->getNumberOfUpSuperArcs();
562 ++j) {
563 ftm::idSuperArc const nodeArcId
564 = tree->getNode(i)->getUpSuperArcId(j);
565 auto tParent = tree->getSuperArc(nodeArcId)->getUpNodeId();
566 if(tParent == i) {
567 // Delete down arc
568 tree->getNode(i)->removeDownSuperArc(nodeArcId);
569 // Delete up arc
570 tree->getNode(i)->removeUpSuperArc(nodeArcId);
571 }
572 }
573 }
574 }
575
576 } // namespace ftm
577} // namespace ttk
int printErr(const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
Definition Debug.h:149
std::stringstream printMultiPersOriginsVectorFromTree(bool doPrint=true) const
void getMultiPersOriginsVectorFromTree(std::vector< std::vector< idNode > > &res) const
bool isBranchOrigin(idNode nodeId) const
int getNumberOfLeavesFromTree() const
int getNumberOfNodeAlone() const
Node * getNode(idNode nodeId) const
Definition FTMTree_MT.h:393
std::stringstream printTree(bool doPrint=true) const
FTMTree_MT(const std::shared_ptr< Params > &params, const std::shared_ptr< Scalars > &scalars, TreeType type)
void getChildren(idNode nodeId, std::vector< idNode > &res) const
SuperArc * getSuperArc(idSuperArc i)
Definition FTMTree_MT.h:367
void getTreeBranching(std::vector< idNode > &branching, std::vector< int > &branchingID, std::vector< std::vector< idNode > > &nodeBranching) const
idNode getNumberOfNodes() const
Definition FTMTree_MT.h:389
bool isMultiPersPair(idNode nodeId) const
void setParent(idNode nodeId, idNode newParentNodeId)
void copyMergeTreeStructure(const FTMTree_MT *tree)
idNode getRoot() const
idNode getDownNodeId(const SuperArc *a)
std::stringstream printTreeStats(bool doPrint=true) const
int getNodeLevel(idNode nodeId) const
idNode getParentSafe(idNode nodeId) const
void getLevelToNode(std::vector< std::vector< idNode > > &res) const
void getAllNodeLevel(std::vector< int > &res) const
std::stringstream printSubTree(idNode subRoot) const
int getNumberOfChildren(idNode nodeId) const
void deleteIthUpArc(idNode nodeId, int arcIth)
int getRealNumberOfNodes() const
void getLeavesFromTree(std::vector< idNode > &res) const
void getBranchOriginsFromThisBranch(idNode node, std::tuple< std::vector< idNode >, std::vector< idNode > > &res) const
bool isNodeOriginDefined(idNode nodeId) const
bool isLeaf(idNode nodeId) const
void deleteNode(idNode nodeId)
void getAllRoots(std::vector< idNode > &res) const
bool isRoot(idNode nodeId) const
bool notNeedToNormalize(idNode nodeId) const
bool isNodeIdInconsistent(idNode nodeId) const
int getNumberOfRoot() const
idNode makeNode(SimplexId vertexId, SimplexId linked=nullVertex)
bool isNodeAlone(idNode nodeId) const
void deleteParent(idNode nodeId)
bool isNodeMerged(idNode nodeId) const
idSuperArc makeSuperArc(idNode downNodeId, idNode upNodeId)
void printNodeSS(idNode node, std::stringstream &ss) const
void getBranchSubtree(std::vector< idNode > &branching, idNode branchRoot, std::vector< idNode > &res) const
bool isFullMerge() const
void deleteSubtree(idNode nodeId)
bool isThereOnlyOnePersistencePair() const
idSuperArc getUpSuperArcId(idSuperArc neighborId) const
Definition FTMNode.h:105
idSuperArc clearUpSuperArcs()
Definition FTMNode.h:133
idSuperArc getNumberOfDownSuperArcs() const
Definition FTMNode.h:82
idSuperArc getDownSuperArcId(idSuperArc neighborId) const
Definition FTMNode.h:94
void removeUpSuperArc(idSuperArc idSa)
Definition FTMNode.h:174
idSuperArc clearDownSuperArcs()
Definition FTMNode.h:127
void setOrigin(SimplexId linked)
Definition FTMNode.h:72
void removeDownSuperArc(idSuperArc idSa)
Definition FTMNode.h:146
SimplexId getOrigin() const
Definition FTMNode.h:64
idSuperArc getNumberOfUpSuperArcs() const
Definition FTMNode.h:86
idNode getUpNodeId() const
Definition FTMSuperArc.h:68
idNode getDownNodeId() const
Definition FTMSuperArc.h:72
long unsigned int idSuperArc
SuperArc index in vect_superArcs_.
void removeSelfLink(FTMTree_MT *tree)
void printTreesStats(std::vector< ftm::FTMTree_MT * > &trees)
unsigned int idNode
Node index in vect_nodes_.
void manageInconsistentArcsMultiParent(FTMTree_MT *tree)
TTK base package defining the standard types.
printMsg(debug::output::BOLD+" | | | | | . \\ | | (__| | / __/| |_| / __/| (_) |"+debug::output::ENDCOLOR, debug::Priority::PERFORMANCE, debug::LineMode::NEW, stream)