TTK
Loading...
Searching...
No Matches
ripser.h
Go to the documentation of this file.
1
4
5#pragma once
6
7#include <algorithm>
8#include <cassert>
9#include <chrono>
10#include <cmath>
11#include <fstream>
12#include <iostream>
13#include <numeric>
14#include <queue>
15#include <sstream>
16#include <unordered_map>
17
18namespace ripser {
19
20 using value_t = double;
21#if defined(TTK_ENABLE_RIPSER_128BITS_IDS) \
22 && (defined(__GNUC__) || defined(__clang__))
23 using index_t = __int128;
24#else
25 using index_t = int64_t;
26#endif
27 using coefficient_t = uint16_t;
28
29 using simplex_t = std::vector<index_t>;
30 using simplex_diam_t = std::pair<simplex_t, value_t>;
31 using pers_pair_t = std::pair<simplex_diam_t, simplex_diam_t>;
32
33 void ripser(std::vector<std::vector<value_t>> points,
34 value_t threshold,
35 index_t dim_max,
36 bool distanceMatrix,
37 std::vector<std::vector<pers_pair_t>> &ph);
38
39} // namespace ripser
uint16_t coefficient_t
Definition ripser.h:27
std::pair< simplex_t, value_t > simplex_diam_t
Definition ripser.h:30
std::pair< simplex_diam_t, simplex_diam_t > pers_pair_t
Definition ripser.h:31
double value_t
Definition ripser.h:20
std::vector< index_t > simplex_t
Definition ripser.h:29
int64_t index_t
Definition ripser.h:25