| 1 |
To build the examples, run in a Terminal: |
| 2 |
|
| 3 |
cd /path-to-examples/ |
| 4 |
cmake . |
| 5 |
make |
| 6 |
|
| 7 |
*********************************************************************************************************************** |
| 8 |
Example of use of RIPS: |
| 9 |
|
| 10 |
Computation of the persistent homology with Z/2Z and Z/3Z coefficients simultaneously of the Rips complex |
| 11 |
on points sampling a 3D torus: |
| 12 |
|
| 13 |
./rips_multifield_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.12 -d 3 -p 2 -q 3 |
| 14 |
|
| 15 |
output: |
| 16 |
6 0 0 inf |
| 17 |
6 1 0.0983494 inf |
| 18 |
6 1 0.104347 inf |
| 19 |
6 2 0.138335 inf |
| 20 |
6 0 0 0.122545 |
| 21 |
6 0 0 0.121171 |
| 22 |
6 0 0 0.120964 |
| 23 |
6 0 0 0.12057 |
| 24 |
6 0 0 0.12047 |
| 25 |
6 0 0 0.120414 |
| 26 |
|
| 27 |
Every line is of this format: p1*...*pr dim b d |
| 28 |
where |
| 29 |
p1*...*pr is the product of prime numbers pi such that the homology feature exists in homology with Z/piZ coefficients. |
| 30 |
dim is the dimension of the homological feature, |
| 31 |
b and d are respectively the birth and death of the feature and |
| 32 |
|
| 33 |
and the computation with all Z/pZ for 2 <= p <= 71 (20 first prime numbers): |
| 34 |
|
| 35 |
./rips_multifield_persistence ../../data/points/Kl.off -r 0.25 -m 0.5 -d 3 -p 2 -q 71 |
| 36 |
|
| 37 |
output: |
| 38 |
557940830126698960967415390 0 0 inf |
| 39 |
557940830126698960967415390 1 0.0983494 inf |
| 40 |
557940830126698960967415390 1 0.104347 inf |
| 41 |
557940830126698960967415390 2 0.138335 inf |
| 42 |
557940830126698960967415390 0 0 0.122545 |
| 43 |
557940830126698960967415390 0 0 0.121171 |
| 44 |
557940830126698960967415390 0 0 0.120964 |
| 45 |
557940830126698960967415390 0 0 0.12057 |
| 46 |
557940830126698960967415390 0 0 0.12047 |
| 47 |
557940830126698960967415390 0 0 0.120414 |
| 48 |
|
| 49 |
*********************************************************************************************************************** |
| 50 |
Example of use of PLAIN HOMOLOGY: |
| 51 |
|
| 52 |
This example computes the plain homology of the following simplicial complex without filtration values: |
| 53 |
/* Complex to build. */ |
| 54 |
/* 1 3 */ |
| 55 |
/* o---o */ |
| 56 |
/* /X\ / */ |
| 57 |
/* o---o o */ |
| 58 |
/* 2 0 4 */ |
| 59 |
|
| 60 |
./plain_homology |
| 61 |
|
| 62 |
output: |
| 63 |
2 0 0 inf |
| 64 |
2 0 0 inf |
| 65 |
2 1 0 inf |
| 66 |
|
| 67 |
Here we retrieve the 2 entities {0,1,2,3} and {4} (Betti numbers[0] = 2) and the hole in {0,1,3} (Betti numbers[1] = 1) |