diff --git a/Project.toml b/Project.toml index 52854a3..de05964 100644 --- a/Project.toml +++ b/Project.toml @@ -31,7 +31,7 @@ DataStructures = "0.18" FiniteDifferences = "0.12" GraphMakie = "0.5" Graphs = "1.6" -KaHyPar = "0.3" +KaHyPar = "0.3.1" Makie = "0.19" Memoize = "0.4" Suppressor = "0.2" diff --git a/src/Optimizers/KaHyPar.jl b/src/Optimizers/KaHyPar.jl index b3c040c..d0c7823 100644 --- a/src/Optimizers/KaHyPar.jl +++ b/src/Optimizers/KaHyPar.jl @@ -10,6 +10,7 @@ using Suppressor configuration::Union{Nothing,Symbol,String} = nothing edge_scaler::Function = Base.Fix1(*, 1000) ∘ Int ∘ round ∘ log2 vertex_scaler::Function = Base.Fix1(*, 1000) ∘ Int ∘ round ∘ log2 + seed::Int = 0 end function EinExprs.einexpr(config::HyPar, path) @@ -28,6 +29,7 @@ function EinExprs.einexpr(config::HyPar, path) vertex_weights = map(config.vertex_scaler ∘ length, path.args) hypergraph = KaHyPar.HyperGraph(incidence_matrix, vertex_weights, edge_weights) + KaHyPar.kahypar_set_seed(hypergraph.context, config.seed) partitions = @suppress KaHyPar.partition( hypergraph,