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

A disaster: the conversion from the SimplicialComplex type to the CombinatorialCode type does not work! #31

Closed vitskov closed 3 years ago

vitskov commented 3 years ago

The method CombinatorialCode, applied to a simplicial complex is supposed to produce the combinatorial code that consists of all the faces of a simplicial complex. This function worked without any problems whatsoever until the insurrection of abstract collection methods that was forced upon..

Now nothing works! Please see the examples below


julia> K=SimplicialComplex(CodeWord.([ [1 , 2 ], [ 2, 3 ]]) ) # Here K is a simplicial cpx whose vertices are of type Int16 SimplicialComplex{Int16} 1-dimensional simplicial complex on 3 vertices with 2 facets V = {1, 2, 3} 1 2 2 3

julia> C=Combinatori CombinatorialCode CombinatorialCodeOnThreeNeurons Combinatorics julia> C=CombinatorialCode(K) ERROR: UndefVarError: f not defined Stacktrace: [1] iterate(::SimplicialComplex{Int16}) at /Users/vladimiritskov/.julia/packages/Simplicial/Mpm9P/src/SimplicialComplexes/SimplicialComplex.jl:112 [2] copyto!(::Array{Any,1}, ::SimplicialComplex{Int16}) at ./abstractarray.jl:733 [3] _collect(::UnitRange{Int64}, ::SimplicialComplex{Int16}, ::Base.HasEltype, ::Base.HasLength) at ./array.jl:630 [4] collect(::SimplicialComplex{Int16}) at ./array.jl:624 [5] CombinatorialCode(::SimplicialComplex{Int16}) at /Users/vladimiritskov/.julia/packages/Simplicial/Mpm9P/src/CombinatorialCodes/CombinatorialCodes.jl:95

julia>

julia> K=SimplicialComplex(([ [1 , 2 ], [ 2, 3 ]]) ) # # Here K is a simplicial cpx whose vertices are of type Int64 SimplicialComplex{Int64} 1-dimensional simplicial complex on 3 vertices with 2 facets V = {1, 2, 3} 1 2 2 3

julia> C=CombinatorialCode(K) ERROR: UndefVarError: f not defined Stacktrace: [1] iterate(::SimplicialComplex{Int64}) at /Users/vladimiritskov/.julia/packages/Simplicial/Mpm9P/src/SimplicialComplexes/SimplicialComplex.jl:112 [2] copyto!(::Array{Any,1}, ::SimplicialComplex{Int64}) at ./abstractarray.jl:733 [3] _collect(::UnitRange{Int64}, ::SimplicialComplex{Int64}, ::Base.HasEltype, ::Base.HasLength) at ./array.jl:630 [4] collect(::SimplicialComplex{Int64}) at ./array.jl:624 [5] CombinatorialCode(::SimplicialComplex{Int64}) at /Users/vladimiritskov/.julia/packages/Simplicial/Mpm9P/src/CombinatorialCodes/CombinatorialCodes.jl:95

julia>