Skip to content

Commit

Permalink
added base 1 bag case for fixed graph
Browse files Browse the repository at this point in the history
  • Loading branch information
andersenwall committed Nov 11, 2024
1 parent 34be99a commit 90372ac
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion benchmarks/GraphColoringFixedGraph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ end
# 1 bag case (40 nodes, no adhesions)

#bag 1
bags1decomp = @acset Graph begin
bags1 = @acset Graph begin
V = 40
E = 63
src = [1, 1, 2, 2, 3, 4, 4, 5, 5, 6, 7, 7, 8, 8, 9, 10, 10, 10, 10, 10, 10, 11, 11, 12, 13, 13, 14, 14, 15, 16, 16, 17, 17, 18, 19,
Expand All @@ -69,6 +69,46 @@ bags1decomp = @acset Graph begin
22, 23, 23, 24, 25, 25, 26, 26, 27, 28, 28, 29, 29, 30, 32, 33, 33, 34, 35, 35, 36, 36, 37, 38, 38, 39, 39, 40]
end

bags2 = @acset Graph begin
V = 1
E = 0
src = []
tgt = []
end

bagsad = @acset Graph begin
V = 1
E = 0
src = []
tgt = []
end

Gₛ = @acset Graph begin
V = 2
E = 1
src = [1]
tgt = [1]
end

#transformations
Γₛ⁰ = Dict(1 => bags1, 2 => bags2, 3 => bagsad)
Γₛ = FinDomFunctor(
Γₛ⁰,
Dict(
1 => ACSetTransformation(Γₛ⁰[3], Γₛ⁰[1], V=[1]),
2 => ACSetTransformation(Γₛ⁰[3], Γₛ⁰[2], V=[1]),
),
(Gₛ)
)

bags1decomp = StrDecomp(Gₛ, Γₛ)

@benchmark decide_sheaf_tree_shape(skeletalColoring(2), bags1decomp)[1]
@benchmark decide_sheaf_tree_shape(skeletalColoring(3), bags1decomp)[1]
@benchmark is_homomorphic(K(2), bag1)
@benchmark is_homomorphic(K(3), bag1)
@benchmark is_homomorphic(K(4), bag1)

# 2 bag case (21 nodes each, 1 node adhesion)

#bag 1
Expand Down

0 comments on commit 90372ac

Please sign in to comment.