henselman-petrusek / Eirene.jl

Julia library for homological persistence
Other
117 stars 21 forks source link

Error when using sparse column format #42

Open Chunhui-Shao opened 3 years ago

Chunhui-Shao commented 3 years ago

I would like to construct a complex C using C = eirene(rv=rv,cp=cp,dv=dv,fv=fv), but it reports errors even when I test the simplest example in readme, which is just 2 points and 1 edge: fv = [0.01,0.02,0.03] dv = [0,0,1] ev = [2,1,0] dp = [1,2,4,4] rv = [1,2] cp = [1,1,3] C = eirene(rv=rv,cp=cp,dv=dv,fv=fv) then: error: please check dimension values (dv) error: please check that the input operator is graded of degree 1

If C = eirene(rv=rv,cp=cp,dp=dp,fv=fv):

BoundsError: attempt to access 3-element Vector{Int64} at index [4]

Stacktrace: [1] getindex @ ./array.jl:801 [inlined] [2] copycolumnsubmatrix(Arv::Vector{Int64}, Acp::Vector{Int64}, columnindices::UnitRange{Int64}) @ Eirene ~/.julia/packages/Eirene/xOC9Y/src/Eirene.jl:2573 [3] unsegmentedfilteredcomplex2segmentedfilteredcomplex(rv::Vector{Int64}, cp::Vector{Int64}, fv::Vector{Float64}, dp::Vector{Int64}; ncd::Int64) @ Eirene ~/.julia/packages/Eirene/xOC9Y/src/Eirene.jl:1619 [4] persistf2complex(; rv::Vector{Int64}, cp::Vector{Int64}, fv::Vector{Float64}, dp::Vector{Int64}, dv::Vector{Int64}, ev::Vector{Int64}, maxdim::Vector{Any}, numrad::Float64, maxrad::Float64, minrad::Float64, record::String, verbose::Bool) @ Eirene ~/.julia/packages/Eirene/xOC9Y/src/Eirene.jl:1763 [5] #eirene#110 @ ~/.julia/packages/Eirene/xOC9Y/src/Eirene.jl:7475 [inlined] [6] top-level scope @ In[12]:10 [7] eval @ ./boot.jl:360 [inlined] [8] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String) @ Base ./loading.jl:1094

If C = eirene(rv=rv,cp=cp,ev=ev,fv=fv):

BoundsError: attempt to access 3-element Vector{Int64} at index [4]

Stacktrace: [1] getindex @ ./array.jl:801 [inlined] [2] copycolumnsubmatrix(Arv::Vector{Int64}, Acp::Vector{Int64}, columnindices::UnitRange{Int64}) @ Eirene ~/.julia/packages/Eirene/xOC9Y/src/Eirene.jl:2573 [3] unsegmentedfilteredcomplex2segmentedfilteredcomplex(rv::Vector{Int64}, cp::Vector{Int64}, fv::Vector{Float64}, dp::Vector{Int64}; ncd::Int64) @ Eirene ~/.julia/packages/Eirene/xOC9Y/src/Eirene.jl:1619 [4] persistf2complex(; rv::Vector{Int64}, cp::Vector{Int64}, fv::Vector{Float64}, dp::Vector{Int64}, dv::Vector{Int64}, ev::Vector{Int64}, maxdim::Vector{Any}, numrad::Float64, maxrad::Float64, minrad::Float64, record::String, verbose::Bool) @ Eirene ~/.julia/packages/Eirene/xOC9Y/src/Eirene.jl:1763 [5] #eirene#110 @ ~/.julia/packages/Eirene/xOC9Y/src/Eirene.jl:7475 [inlined] [6] top-level scope @ In[17]:10 [7] eval @ ./boot.jl:360 [inlined] [8] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String) @ Base ./loading.jl:1094