summaryrefslogtreecommitdiff
path: root/example/Persistent_cohomology/README
blob: f39d95847c2cf8ff4b9c6497c41bfc77a7a964a2 (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
57
58
59
60
61
62
63
64
65
66
67
To build the examples, run in a Terminal:

cd /path-to-examples/
cmake .
make

***********************************************************************************************************************
Example of use of RIPS:

Computation of the persistent homology with Z/2Z and Z/3Z coefficients simultaneously of the Rips complex 
on points sampling a 3D torus:

./rips_multifield_persistence ../../data/points/tore3D_1307.off -r 0.25 -m 0.12 -d 3 -p 2 -q 3

output:
6  0 0 inf 
6  1 0.0983494 inf 
6  1 0.104347 inf 
6  2 0.138335 inf 
6  0 0 0.122545 
6  0 0 0.121171 
6  0 0 0.120964 
6  0 0 0.12057 
6  0 0 0.12047 
6  0 0 0.120414 

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

and the computation with all Z/pZ for 2 <= p <= 71 (20 first prime numbers):

 ./rips_multifield_persistence ../../data/points/Kl.off -r 0.25 -m 0.5 -d 3 -p 2 -q 71

output:
557940830126698960967415390  0 0 inf 
557940830126698960967415390  1 0.0983494 inf 
557940830126698960967415390  1 0.104347 inf 
557940830126698960967415390  2 0.138335 inf 
557940830126698960967415390  0 0 0.122545 
557940830126698960967415390  0 0 0.121171 
557940830126698960967415390  0 0 0.120964 
557940830126698960967415390  0 0 0.12057 
557940830126698960967415390  0 0 0.12047 
557940830126698960967415390  0 0 0.120414 

***********************************************************************************************************************
Example of use of PLAIN HOMOLOGY:

This example computes the plain homology of the following simplicial complex without filtration values:
  /* Complex to build. */
  /*    1   3          */
  /*    o---o          */
  /*   /X\ /           */
  /*  o---o   o        */
  /*  2   0   4        */

./plain_homology 

output:
2  0 0 inf 
2  0 0 inf 
2  1 0 inf 

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)