TTK
Loading...
Searching...
No Matches
PersistenceDiagramUtils.h
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4#include <tuple>
5#include <vector>
6
7#include <BaseClass.h>
8
9namespace ttk {
10
20 double sfValue;
22 std::array<float, 3> coords;
23 };
24
39
43 bool operator<(const PersistencePair &rhs) const {
44 return this->birth.sfValue < rhs.birth.sfValue;
45 }
46
50 inline double persistence() const {
51 return this->death.sfValue - this->birth.sfValue;
52 }
53 };
54
58 using DiagramType = std::vector<PersistencePair>;
59
63 using MatchingType = std::tuple<int,
64 int,
65 double
66 >;
67
68}; // namespace ttk
The Topology ToolKit.
CriticalType
default value for critical index
Definition DataTypes.h:80
std::vector< PersistencePair > DiagramType
Persistence Diagram type as a vector of Persistence pairs.
std::tuple< int, int, double > MatchingType
Matching between two Persistence Diagram pairs.
int SimplexId
Identifier type for simplices of any dimension.
Definition DataTypes.h:22
std::array< float, 3 > coords
double persistence() const
Return the topological persistence of the pair.
bool operator<(const PersistencePair &rhs) const
Order pairs according to their birth value.