summaryrefslogtreecommitdiff
path: root/src/Alpha_complex/utilities/README
blob: abb17bf7b3cad10ab8dfeba19f8440f7c2f1f917 (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# Alpha_complex #

## `alpha_complex_3d_persistence` ##
This program computes the persistent homology with coefficient field Z/pZ of the 3D alpha complex built from a 3D point cloud. The output diagram contains one bar per line, written with the convention:

`p dim b d`

where `dim` is the dimension of the homological feature, `b` and `d` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p` must be a prime number).

**Usage**
`alpha_complex_3d_persistence <input OFF file> <p> <min_persistence>` 
where
`<input OFF file>` is the path to the input point cloud in OFF format.
`<p>` is the characteristic p of the coefficient field *Z/pZ* for computing homology. It must be a stricly positive integer.
`<min_persistence>` is the minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals.

**Example**
`alpha_complex_3d_persistence ../../data/points/tore3D_300.off 2 0.45`

outputs:
```
Simplex_tree dim: 3
2  0 0 inf 
2  1 0.0682162 1.0001 
2  1 0.0934117 1.00003 
2  2 0.56444 1.03938 
```

Here we retrieve expected Betti numbers on a tore 3D:
```
Betti numbers[0] = 1
Betti numbers[1] = 2
Betti numbers[2] = 1
```

N.B.: 
* `alpha_complex_3d_persistence` only accepts OFF files in dimension 3.
* Filtration values are alpha square values.




## `periodic_alpha_complex_3d_persistence` ##
This program computes the persistent homology with coefficient field Z/pZ of the 3D periodic alpha complex built from a 3D point cloud. The output diagram contains one bar per line, written with the convention:

`p dim b d`

where `dim` is the dimension of the homological feature, `b` and `d` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p` must be a prime number).

**Usage**
`periodic_alpha_complex_3d_persistence <input OFF file> <p> <min_persistence>`
where
`<input OFF file>` is the path to the input point cloud in OFF format.
`<p>` is the characteristic p of the coefficient field *Z/pZ* for computing homology. It must be a stricly positive integer.
`<min_persistence>` is the minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals.

**Example**
`periodic_alpha_complex_3d_persistence ../../data/points/grid_10_10_10_in_0_1.off ../../data/points/iso_cuboid_3_in_0_1.txt 3 1.0`

outputs:
```
Periodic Delaunay computed.
Simplex_tree dim: 3
3  0 0 inf 
3  1 0.0025 inf 
3  1 0.0025 inf 
3  1 0.0025 inf 
3  2 0.005 inf 
3  2 0.005 inf 
3  2 0.005 inf 
3  3 0.0075 inf 
```

Here we retrieve expected Betti numbers on an 3D iso-oriented cuboids:
```
Betti numbers[0] = 1
Betti numbers[1] = 3
Betti numbers[2] = 3
Betti numbers[3] = 1
```

N.B.: 
* `periodic_alpha_complex_3d_persistence` only accepts OFF files in dimension 3.
* In this example, the periodic cube is hard coded to { x = [0,1]; y = [0,1]; z = [0,1] }
* Filtration values are alpha square values.





## `alpha_complex_persistence` ##
This program computes the persistent homology with coefficient field Z/pZ of the dD alpha complex built from a dD point cloud. The output diagram contains one bar per line, written with the convention:

`p dim b d`

where `dim` is the dimension of the homological feature, `b` and `d` are respectively the birth and death of the feature, and `p` is the characteristic of the field *Z/pZ* used for homology coefficients (`p` must be a prime number).

**Usage**
`alpha_complex_persistence [options] <OFF input file>`

**Allowed options**

* `-h [ --help ]` Produce help message
* `-o [ --output-file ]` Name of file in which the persistence diagram is written. By default, print in std::cout.
* `-r [ --max-alpha-square-value ]` (default = inf) Maximal alpha square value for the Alpha complex construction.
* `-p [ --field-charac ]` (default = 11)     Characteristic p of the coefficient field Z/pZ for computing homology.
* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals.

**Example**
`alpha_complex_persistence -r 32 -p 2 -m 0.45 ../../data/points/tore3D_300.off`

outputs:
```
Alpha complex is of dimension 3 - 9273 simplices - 300 vertices.
Simplex_tree dim: 3
2  0 0 inf 
2  1 0.0682162 1.0001 
2  1 0.0934117 1.00003 
2  2 0.56444 1.03938 
```

Here we retrieve expected Betti numbers on a tore 3D:
```
Betti numbers[0] = 1
Betti numbers[1] = 2
Betti numbers[2] = 1
```

N.B.: 
* `alpha_complex_persistence` only accepts OFF files in dimension d.
* Filtration values are alpha square values.