appliedtopology / javaplex

Persistent Homology and Topological Data Analysis Library
BSD 3-Clause "New" or "Revised" License
191 stars 57 forks source link

persistent homology over the rationals - problem with the annotation #5

Closed eliranav closed 8 years ago

eliranav commented 9 years ago

When executing: stream = api.Plex4.createExplicitSimplexStream();

stream.addVertex(0); stream.addVertex(1); stream.addVertex(2); stream.addElement([0, 1]); stream.addElement([0, 2]); stream.addElement([1, 2]);

Q_persistence = api.Plex4.getRationalSimplicialAlgorithm(2) Q_persistence.computeAnnotatedIntervals(stream)

I got the following result: circle_intervals =

Dimension: 0 [0.0, infinity): org.apache.commons.math.fraction.Fraction@5b0f [0] Dimension: 1 [0.0, infinity): org.apache.commons.math.fraction.Fraction@5b0f [1,2] + org.apache.commons.math.fraction.Fraction@5ac5 [0,2] + org.apache.commons.math.fraction.Fraction@5b0f [0,1]

I'm pretty sure the output should look different (compare with: Dimension: 0 [0.0, infinity): [0] Dimension: 1 [0.0, infinity): [1,2] + [0,2] + [0,1] which is what you get when computing persistent homology over Z_2).