TTK
Loading...
Searching...
No Matches
ContourForestsTree.h
Go to the documentation of this file.
1
19
20#pragma once
21
22#include <memory>
23#include <queue>
24#include <set>
25
26// base code includes
27#include <Geometry.h>
28#include <Triangulation.h>
29#include <Wrapper.h>
30
31#include "DeprecatedDataTypes.h"
32#include "ExtendedUF.h"
33#include "MergeTree.h"
34
35namespace ttk {
36 namespace cf {
38 friend class ContourForests;
39
40 protected:
42
43 public:
44 // -----------------
45 // Constructors
46 // -----------------
47 // {
48
49 ContourForestsTree(const std::shared_ptr<Params> &params,
50 const std::shared_ptr<Scalars> &scalars,
51 idPartition part = nullPartition);
53
54 // }
55 // -----------------
56 // INITIALIZE
57 // -----------------
58 // {
59
60 void flush() {
62 jt_.flush();
63 st_.flush();
64 }
65
66 // }
67 // -----------------
68 // ACCESSOR
69 // -----------------
70 // {
71
73 return &jt_;
74 }
75
77 return &st_;
78 }
79
80 inline MergeTree *getTree(const TreeType &tt) {
81 switch(tt) {
83 case TreeType::Split:
84 return getSplitTree();
85 break;
86 case TreeType::Join:
87 return getJoinTree();
88 break;
90 return this;
91 break;
92 }
93 return this;
94 }
95
96 // }
97 // -----------------
98 // PROCESS
99 // -----------------
100 // {
101
103 int combine(const SimplexId &seed0,
104 const SimplexId &seed1,
105 std::list<std::vector<std::pair<SimplexId, bool>>> &storage);
106
107 private:
108 // -----------------
109 // PROCESS
110 // -----------------
111 // {
112
114 template <typename scalarType>
115 void initDataMT();
116
117 // }
118 };
119 } // namespace cf
120} // namespace ttk
int combine(const SimplexId &seed0, const SimplexId &seed1, std::list< std::vector< std::pair< SimplexId, bool > > > &storage)
Combine tree with Natarajan's algorithm.
MergeTree * getTree(const TreeType &tt)
friend class ContourForestsTree
Definition MergeTree.h:39
void flush()
clear local data for new computation
Definition MergeTree.h:87
numThread idPartition
The Topology ToolKit.
int SimplexId
Identifier type for simplices of any dimension.
Definition DataTypes.h:22