blob: 8c71ccf51172399d43c9ec2a6f6811dd670ad6d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
To build the example, run in a Terminal:
cd /path-to-example/
cmake .
make
Example of use :
Computation of the persistent homology with Z/2Z coefficients of the Rips complex on points
sampling a Klein bottle:
./rips_persistence ../../../data/points/Kl.txt -r 0.25 -d 3 -p 2 -m 100
output:
210 0 0 inf
210 1 0.0702103 inf
2 1 0.0702103 inf
2 2 0.159992 inf
Every line is of this format: p1*...*pr dim b d
where
p1*...*pr is the product of prime numbers pi such that the homology feature exists in homology with Z/piZ coefficients.
dim is the dimension of the homological feature,
b and d are respectively the birth and death of the feature and
with Z/3Z coefficients:
./rips_persistence ../../../data/points/Kl.txt -r 0.25 -d 3 -p 3 -m 100
output:
3 0 0 inf
3 1 0.0702103 inf
and the computation with Z/2Z and Z/3Z coefficients simultaneously:
./rips_multifield_persistence ../../../data/points/Kl.txt -r 0.25 -d 3 -p 2 -q 3 -m 100
output:
6 0 0 inf
6 1 0.0702103 inf
2 1 0.0702103 inf
2 2 0.159992 inf
and finally the computation with all Z/pZ for 2 <= p <= 71 (20 first prime numbers):
./rips_multifield_persistence ../../../data/points/Kl.txt -r 0.25 -d 3 -p 2 -q 71 -m 100
output:
557940830126698960967415390 0 0 inf
557940830126698960967415390 1 0.0702103 inf
2 1 0.0702103 inf
2 2 0.159992 inf
|