Hi, sorry bit behind on this thread. A sparse matrix API would probably be the best, since systems are usually large. The method is applicable to both matrix and graph calculations. We currently convert a LightGraphs.jl object into a SparseArrays.SparseMatrixCSC{Int64,Int64}
– e.g.
using IncrementalInference
fg = generateCanonicalFG_Kaess()
drawGraph(fg, show=true)
DFG.getBiadjacencyMatrix(fg)
NamedTuple{(:B, :varLabels, :facLabels),Tuple{SparseArrays.SparseMatrixCSC,Array{Symbol,1},Array{Symbol,1}}}((
[2, 1] = 1
[3, 1] = 1
[3, 2] = 1
[4, 2] = 1
[6, 2] = 1
[5, 3] = 1
[5, 4] = 1
[6, 4] = 1
[1, 5] = 1
[2, 5] = 1
[4, 5] = 1, [:l1, :x2, :l2, :x3, :x1], [:x1f1, :x1l1f1, :x2l1f1, :x1x2f1, :x3l2f1, :x2x3f1]))
and our current use is (not yet RCS, but the default in qr
which is likely AMD)
julia> getEliminationOrder(fg)
5-element Array{Symbol,1}:
:l2
:l1
:x3
:x1
:x2
Do you have GPS implemented at this point?
No not yet, but we were about to go down this path until @PetrKryslUCSD 's earlier comments (thanks!), and I’d much rather just use the RCM implementation (from FinETools.jl). I can certainly help out, and if it’s okay to ask for collaborator access to help build and maintain such a new repo if possible please? There’s probably a better place to host, but if not I can start a repo at JuliaRobotics (with MIT or BSD license)?
I suspect in the long term more (possibly new) algorithms are likely to be built alongside RCS in a “standardized” repo, RCS would be a great way to get that started and have as reference solution!