Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when reconstructing cycles #164

Open
mkreisel opened this issue May 18, 2023 · 1 comment
Open

Error when reconstructing cycles #164

mkreisel opened this issue May 18, 2023 · 1 comment

Comments

@mkreisel
Copy link

I get the following error when trying to use the reconstruct cycles function. I have tried manually upgrading the Graphs library to see if that helps but it still gives the same error. I can provide the underlying data if needed. Thank you for including this functionality - I don't see it available in any other packages!

BoundsError: attempt to access Tuple{Int64} at index [2]

Stacktrace:
[1] getindex(t::Tuple, i::Int64)
@ Base ./tuple.jl:29
[2] getindex
@ ~/.julia/packages/StaticArrays/J9itA/src/SArray.jl:62 [inlined]
[3] _next_common
@ ~/.julia/packages/Ripserer/RPZgP/src/base/abstractsimplex.jl:232 [inlined]
[4] iterate
@ ~/.julia/packages/Ripserer/RPZgP/src/base/abstractsimplex.jl:256 [inlined]
[5] iterate
@ ~/.julia/packages/Ripserer/RPZgP/src/base/abstractsimplex.jl:252 [inlined]
[6] outneighbors(g::OneSkeleton{Simplex{1, Float64, Int64}, Rips{Int64, Float64, SparseMatrixCSC{Float64, Int64}}, Simplex{1, Float64, Int64}, SparseMatrixCSC{Float64, Int64}}, u::Int64)
@ Main ./In[108]:63
[7] a_star_impl!(g::OneSkeleton{Simplex{1, Float64, Int64}, Rips{Int64, Float64, SparseMatrixCSC{Float64, Int64}}, Simplex{1, Float64, Int64}, SparseMatrixCSC{Float64, Int64}}, goal::Int64, open_set::DataStructures.PriorityQueue{Int64, Float64, Base.Order.ForwardOrdering}, closed_set::Vector{Bool}, g_score::Vector{Float64}, came_from::Vector{Int64}, distmx::SparseMatrixCSC{Float64, Int64}, heuristic::var"#38#39"{Int64, SparseMatrixCSC{Float64, Int64}}, edgetype_to_return::Type{Graphs.SimpleGraphs.SimpleEdge{Int64}})
@ Graphs ~/.julia/packages/Graphs/7SMZs/src/shortestpaths/astar.jl:43
[8] a_star(g::OneSkeleton{Simplex{1, Float64, Int64}, Rips{Int64, Float64, SparseMatrixCSC{Float64, Int64}}, Simplex{1, Float64, Int64}, SparseMatrixCSC{Float64, Int64}}, s::Int64, t::Int64, distmx::SparseMatrixCSC{Float64, Int64}, heuristic::Function, edgetype_to_return::Type{Graphs.SimpleGraphs.SimpleEdge{Int64}})
@ Graphs ~/.julia/packages/Graphs/7SMZs/src/shortestpaths/astar.jl:94
[9] a_star
@ ~/.julia/packages/Graphs/7SMZs/src/shortestpaths/astar.jl:81 [inlined]
[10] _find_cycle(g::OneSkeleton{Simplex{1, Float64, Int64}, Rips{Int64, Float64, SparseMatrixCSC{Float64, Int64}}, Simplex{1, Float64, Int64}, SparseMatrixCSC{Float64, Int64}}, dists::SparseMatrixCSC{Float64, Int64})
@ Main ./In[108]:115
[11] reconstruct_cycle_2(filtration::Rips{Int64, Float64, SparseMatrixCSC{Float64, Int64}}, interval::PersistenceDiagrams.PersistenceInterval, r::Simplex{1, Float64, Int64}; distances::SparseMatrixCSC{Float64, Int64})
@ Main ./In[108]:179
[12] reconstruct_cycle_2(filtration::Rips{Int64, Float64, SparseMatrixCSC{Float64, Int64}}, interval::PersistenceDiagrams.PersistenceInterval, r::Simplex{1, Float64, Int64})
@ Main ./In[108]:158
[13] reconstruct_cycle_2(filtration::Rips{Int64, Float64, SparseMatrixCSC{Float64, Int64}}, interval::PersistenceDiagrams.PersistenceInterval)
@ Main ./In[108]:158
[14] top-level scope
@ In[109]:2

@mtsch
Copy link
Owner

mtsch commented May 24, 2023

Hmm that looks weird... Can you provide the script and data you used so I can debug this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants