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
18 double sfValue;
19 /* global offset of the vertex*/
22 std::array<float, 3> coords;
25 };
26
41
45 bool operator<(const PersistencePair &rhs) const {
46 return this->birth.sfValue < rhs.birth.sfValue;
47 }
48
52 inline double persistence() const {
53 return this->death.sfValue - this->birth.sfValue;
54 }
55 };
56
60 using DiagramType = std::vector<PersistencePair>;
61
65 using MatchingType = std::tuple<int,
66 int,
67 double
68 >;
69
70}; // namespace ttk
TTK base package defining the standard types.
int SimplexId
Identifier type for simplices of any dimension.
Definition DataTypes.h:22
CriticalType
default value for critical index
Definition DataTypes.h:88
std::tuple< int, int, double > MatchingType
Matching between two Persistence Diagram pairs.
std::vector< PersistencePair > DiagramType
Persistence Diagram type as a vector of Persistence pairs.
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.