TTK
Loading...
Searching...
No Matches
FTRDataTypes.h
Go to the documentation of this file.
1
9
10#pragma once
11
12// core includes
13#include <DataTypes.h>
14
15// c++ includes
16#include <functional>
17#include <limits>
18
19namespace ttk {
20 namespace ftr {
21 // Types
22 // --------
23
25 using idSuperArc = long unsigned int;
27 using idNode = unsigned int;
39 using idSegmentation = long int;
40
42 using orderedEdge = std::tuple<idVertex, idVertex>;
43
46 using orderedTriangle = std::tuple<idEdge, idEdge, idEdge>;
47
49 enum class vertPosInTriangle : char { Start = 0, Middle, End };
50
51 // For tasks:
52 // Set using scalar value comparison
53 using VertCompFN = std::function<bool(const idVertex, const idVertex)>;
54 using EdgeCompFN = std::function<bool(const idEdge, const idEdge)>;
55 using linkEdge = std::pair<idEdge, idEdge>;
56 using LinkCompFN = std::function<bool(const linkEdge &, const linkEdge &)>;
57
58 // all null values are dealt with using the maximum of the type
59 // WHEN C++14 will be used
60 // TODO
61 // template <typename T>
62 // static const T null = std::numeric_limits<T>::max();
63 // nullVertex become: null<idVertex>
64
65 // Special values for types
66 // --------------------------
67
68 // QUESTION impact on performance using max (0 would be faster alloacted)
69 static const idSuperArc nullSuperArc
70 = std::numeric_limits<idSuperArc>::max();
71 static const idNode nullNode = std::numeric_limits<idNode>::max();
72 static const idVertex nullVertex = std::numeric_limits<idVertex>::max();
73 static const idEdge nullEdge = std::numeric_limits<idEdge>::max();
74 static const idCell nullCell = std::numeric_limits<idCell>::max();
75 static const idPropagation nullProp
76 = std::numeric_limits<idPropagation>::max();
77 static const idSegmentation nullSegment
78 = std::numeric_limits<idSegmentation>::max();
79
80 static const linkEdge nullLink = std::make_pair(nullEdge, nullEdge);
81
82 // Enum data
83 // ----------
84
85 enum class GraphComponent {
86 Arc = -1,
88 Saddle1,
89 Saddle2,
91 };
92
93 enum class ArcType : char {
94 Min_arc = 0,
95 Max_arc,
99 };
100
101 enum class NodeType {
102 Local_minimum = 0,
103 Saddle1,
104 Saddle2,
107 Regular
108 };
109 } // namespace ftr
110} // namespace ttk
std::tuple< idVertex, idVertex > orderedEdge
Edge represented by its 2 vertices, lower then upper.
std::function< bool(const idVertex, const idVertex)> VertCompFN
std::tuple< idEdge, idEdge, idEdge > orderedTriangle
Triangle represented by its 3 edges Edges are sorted by their starting vertex (see orderedEdge)
vertPosInTriangle
position of a vertex in a triangle
SimplexId idCell
Cell index in vect_cellList_.
std::function< bool(const linkEdge &, const linkEdge &)> LinkCompFN
long int idSegmentation
retains history
idNode idPropagation
for task identifiers
std::function< bool(const idEdge, const idEdge)> EdgeCompFN
long unsigned int idSuperArc
SuperArc index in vect_superArcs_.
SimplexId valence
for vertex up/down valence
SimplexId idVertex
Vertex index in scalars_.
SimplexId idEdge
Edge index in vect_edgeList_.
unsigned int idNode
Node index in vect_nodes_.
std::pair< idEdge, idEdge > linkEdge
The Topology ToolKit.
int SimplexId
Identifier type for simplices of any dimension.
Definition DataTypes.h:22