TTK
Loading...
Searching...
No Matches
DeprecatedStructures.h
Go to the documentation of this file.
1
2//
13
14#pragma once
15
16#include <iterator>
17
18#include "DeprecatedDataTypes.h"
19#include "DeprecatedNode.h"
20#include "DeprecatedSuperArc.h"
21
22namespace ttk {
23 namespace cf {
24 // Compute parameters (global)
31
32 // Scalar related containers (global)
33 struct Scalars {
35 void *values{};
37 std::vector<SimplexId> sortedVertices{};
38
39 bool isLower(const SimplexId &a, const SimplexId &b) const {
40 return sosOffsets[a] < sosOffsets[b];
41 }
42 bool isHigher(const SimplexId &a, const SimplexId &b) const {
43 return sosOffsets[a] > sosOffsets[b];
44 }
45 };
46
47 // Tree data ( 1 per tree )
48 struct TreeData {
51
52 // components : tree / nodes / extrema
53 std::vector<SuperArc> superArcs;
54 std::vector<Node> nodes;
55 std::vector<idNode> leaves, roots;
56
57 // arc crossing an interface (one can be in both)
58 std::vector<idSuperArc> arcsCrossingBelow, arcsCrossingAbove;
59
60 // vertex 2 node / superarc
61 std::vector<idCorresp> vert2tree;
62 };
63
64 // info on one vertex and CT arc in which it is
69
70 using segmentIterator = std::vector<vertex>::iterator;
71 using segmentRevIterator = std::vector<vertex>::reverse_iterator;
72
73 // If we want to cross a Segment in the sorted order,
74 // which is form the end to the beginning in the case of Split Tree,
75 // we can do so by using sbegin and send which use this class
77 public:
79 : segmentIterator(base), forward_(true) {
80 }
82 : segmentIterator(base.base()), forward_(false) {
83 }
84
86 if(forward_) {
87 std::vector<vertex>::iterator::operator++();
88 } else {
89 std::vector<vertex>::iterator::operator--();
90 }
91
92 return *this;
93 }
94
95 private:
96 bool forward_;
97 };
98
99 // Segmentation data
100 struct Region {
101 // inverted in case of split tree
105
111
117 };
118 } // namespace cf
119} // namespace ttk
sorted_iterator(const segmentRevIterator &base)
sorted_iterator(const segmentIterator &base)
const sorted_iterator & operator++()
numThread idPartition
std::vector< vertex >::iterator segmentIterator
long unsigned int idSuperArc
SuperArc index in vect_superArcs_.
std::vector< vertex >::reverse_iterator segmentRevIterator
The Topology ToolKit.
int SimplexId
Identifier type for simplices of any dimension.
Definition DataTypes.h:22
SimplifMethod simplifyMethod
segmentIterator segmentEnd
sorted_iterator sbegin() const
segmentIterator segmentBegin
sorted_iterator send() const
bool isHigher(const SimplexId &a, const SimplexId &b) const
std::vector< SimplexId > sortedVertices
bool isLower(const SimplexId &a, const SimplexId &b) const
const SimplexId * sosOffsets
std::vector< idSuperArc > arcsCrossingAbove
std::vector< idNode > leaves
std::vector< Node > nodes
std::vector< SuperArc > superArcs
std::vector< idSuperArc > arcsCrossingBelow
std::vector< idNode > roots
std::vector< idCorresp > vert2tree