nebneuron / Simplicial.jl

A package for various computations with simplicial complexes, combinatorial codes, directed complexes and their filtrations.
Other
27 stars 9 forks source link

buggy SimplicialComplex constructir: #13

Closed vitskov closed 6 years ago

vitskov commented 6 years ago

julia> K=SimplicialComplex([[1,2], [], [1,3],[2,3]]) Simplicial.SimplicialComplex{Any} 1-dimensional simplicial complex on 3 vertices with 3 facets V = {1, 2, 3} max K = {Set(Any[2, 1]), Set(Any[3, 1]), Set(Any[2, 3])}

How did Any end up to be the integer type!?

sekunder commented 6 years ago

By default, the constant [] is of type Array{Any,1}, whereas, e.g. setdiff([1,2],[1,2]) returns an empty Array{Int,1}.

  1. If you are passing empty sets to the constructor programmatically, e.g. while computing a link or deletion, they will still be of the correct type.
  2. In the meantime, I'll see if there's a painless way to fix this for general use.
sekunder commented 6 years ago

Should be fixed now