Coder Social home page Coder Social logo

computationalhomology.jl's People

Contributors

wildart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

computationalhomology.jl's Issues

Wrong homology groups

Good morning,

I was trying to compute a well known homology group (a torus with 3 circumferences identified to 3 lines) and I got an error in its computation using this library. The same triangulation worked as expected in the library Polymake so I guess there is some kind of error in the implementation (or it may be that I'm not using it well).

I give you the code to reproduce the error:

using ComputationalHomology

dim_0_simplices = [Simplex(i) for i in 0:5]
dim_1_simplices = [Simplex(0, 1), Simplex(0, 2), Simplex(0, 3), Simplex(0,4),
Simplex(0,5),Simplex(1, 2), Simplex(1,3), 
    Simplex(1, 4), Simplex(1, 5), Simplex(2, 3), 
    Simplex(2, 4), Simplex(2, 5), Simplex(3,4), 
    Simplex(3, 5), Simplex(4, 5)]
dim_2_simplices = [Simplex(0,1,3), Simplex(0, 1, 4), Simplex(0, 2, 3), 
    Simplex(0, 2, 5), Simplex(0, 3, 4), Simplex(0, 3, 5), Simplex(1, 2, 4), 
    Simplex(1, 2, 5), Simplex(1, 3, 4), Simplex(1, 4, 5), Simplex(2, 3, 5), Simplex(2, 4, 5)]
cplx = SimplicialComplex((vcat(vcat(dim_0_simplices, dim_1_simplices), dim_2_simplices)...))

h = homology(Int, cplx)

betti(h) 

>> (1,1)
using Polymake

dim_0_simplices = [Set([i]) for i in 0:5]
dim_1_simplices = [Set((0, 1)), Set((0, 2)), Set((0, 3)), Set((0,4)),
Set((0,5)),Set((1, 2)), Set((1,3)), 
    Set((1, 4)), Set((1, 5)), Set((2, 3)), 
    Set((2, 4)), Set((2, 5)), Set((3,4)), 
    Set((3, 5)), Set((4, 5))]
dim_2_simplices = [Set((0,1,3)), Set((0, 1, 4)), Set((0, 2, 3)), 
    Set((0, 2, 5)), Set((0, 3, 4)), Set((0, 3, 5)), Set((1, 2, 4)),
    Set((1, 2, 5)), Set((1, 3, 4)), Set((1, 4, 5)), Set((2, 3, 5)), Set((2, 4, 5))]

cplx = topaz.SimplicialComplex(INPUT_FACES=vcat(vcat(dim_0_simplices, dim_1_simplices), dim_2_simplices))

f = cplx.HOMOLOGY

>>
 ({} 0)
({} 1)
({} 3)

I leave here a link with the triangulation in question:

https://math.stackexchange.com/questions/821380/why-is-this-not-a-triangulation-of-the-torus

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.