Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
Expand Down
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ version = "0.35.6"
ApproxManifoldProducts = "9bbbb610-88a1-53cd-9763-118ce10c1f89"
BSON = "fbb218c0-5317-5bc6-957e-2ee96dd4b1f0"
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
CliqueTrees = "60701a23-6482-424a-84db-faee86b9b1f8"
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down Expand Up @@ -67,6 +68,7 @@ IncrInfrInterpolationsExt = "Interpolations"
AMD = "0.5"
ApproxManifoldProducts = "0.9"
BSON = "0.2, 0.3"
CliqueTrees = "0.5"
Combinatorics = "1.0"
DataStructures = "0.16, 0.17, 0.18"
DelimitedFiles = "1"
Expand Down
2 changes: 2 additions & 0 deletions src/IncrementalInference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module IncrementalInference

# @info "Multithreaded convolutions possible, Threads.nthreads()=$(Threads.nthreads()). See `addFactor!(.;threadmodel=MultiThreaded)`."

import CliqueTrees

using Distributed
using Reexport

Expand Down
12 changes: 12 additions & 0 deletions src/services/BayesNet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ function getEliminationOrder(
# cons[findall(x -> x in constraints, permuteds)] .= 1
# p = Ccolamd.ccolamd(adjMat, cons)
@warn "Integration via AMD.ccolamd under development and replaces pre-Julia 1.9 direct ccall approach." maxlog=5
elseif ordering == :mcs
# maximum cardinality search
A = adjMat
p, _ = CliqueTrees.permutation(A'A; alg=CliqueTrees.MCS())
elseif ordering == :rcm
# reverse Cuthill-Mckee
A = adjMat
p, _ = CliqueTrees.permutation(A'A; alg=CliqueTrees.RCM())
elseif ordering == :mmd
# multiple minimum degree
A = adjMat
p, _ = CliqueTrees.permutation(A'A; alg=CliqueTrees.MMD())
else
@error("getEliminationOrder -- cannot do the requested ordering $(ordering)")
end
Expand Down
5 changes: 3 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ if TEST_GROUP in ["all", "basic_functional_group"]
include("testSpecialEuclidean2Mani.jl")
include("testEuclidDistance.jl")
# gradient / jacobian tests
include("manifolds/manifolddiff.jl")
include("manifolds/factordiff.jl")
#include("manifolds/manifolddiff.jl")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will resolve these in separate PRs

#include("manifolds/factordiff.jl")
@error "Gradient tests must be updated and restored for new ccw.varValsAll[]"
#include("testGradientUtils.jl")
#include("testFactorGradients.jl")
Expand Down Expand Up @@ -66,6 +66,7 @@ include("testStateMachine.jl")
include("testBasicCSM.jl")
include("testCliqueFactors.jl")
include("testCcolamdOrdering.jl")
include("testCliqueTreesOrderings.jl")
include("testBasicGraphs.jl")
include("testJointEnforcement.jl")
include("testHasPriors913.jl")
Expand Down
2 changes: 1 addition & 1 deletion test/testCcolamdOrdering.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ vo = getEliminationOrder(fg, constraints=[:x3;:l2], ordering=:ccolamd)
# end

##
end
end
21 changes: 21 additions & 0 deletions test/testCliqueTreesOrderings.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using AMD
using IncrementalInference
using Test

@testset "Test mcs, rcm, and mmd orderings" begin

fg = generateGraph_Kaess(graphinit=false)

vo = getEliminationOrder(fg, ordering=:mcs)
@test length(vo) == length(Set(vo))
@test length(vo) == length(ls(fg))

vo = getEliminationOrder(fg, ordering=:rcm)
@test length(vo) == length(Set(vo))
@test length(vo) == length(ls(fg))

vo = getEliminationOrder(fg, ordering=:mmd)
@test length(vo) == length(Set(vo))
@test length(vo) == length(ls(fg))

end