Skip to content

Commit

Permalink
Merge pull request #70 from Herb-AI/remove_fixed_shape_iterator
Browse files Browse the repository at this point in the history
remove use_uniformsolver parameter from GenericSolver
  • Loading branch information
ReubenJ authored Feb 20, 2025
2 parents b7ca7be + 18a37bb commit 52d713c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "HerbConstraints"
uuid = "1fa96474-3206-4513-b4fa-23913f296dfc"
authors = ["Jaap de Jong <[email protected]>"]
version = "0.2.5"
version = "0.3.0"

[deps]
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Expand Down
9 changes: 4 additions & 5 deletions src/solver/generic_solver/generic_solver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mutable struct GenericSolver <: Solver
state::Union{SolverState, Nothing}
schedule::PriorityQueue{AbstractLocalConstraint, Int}
statistics::Union{SolverStatistics, Nothing}
use_uniformsolver::Bool
fix_point_running::Bool
max_size::Int
max_depth::Int
Expand All @@ -30,9 +29,9 @@ end
Constructs a new solver, with an initial state using starting symbol `sym`
"""
function GenericSolver(grammar::AbstractGrammar, sym::Symbol; with_statistics=false, use_uniformsolver=true, max_size = typemax(Int), max_depth = typemax(Int))
function GenericSolver(grammar::AbstractGrammar, sym::Symbol; with_statistics=false, max_size = typemax(Int), max_depth = typemax(Int))
init_node = Hole(get_domain(grammar, sym))
GenericSolver(grammar, init_node, with_statistics=with_statistics, use_uniformsolver=use_uniformsolver, max_size = max_size, max_depth = max_depth)
GenericSolver(grammar, init_node, with_statistics=with_statistics, max_size = max_size, max_depth = max_depth)
end


Expand All @@ -41,9 +40,9 @@ end
Constructs a new solver, with an initial state of the provided [`AbstractRuleNode`](@ref).
"""
function GenericSolver(grammar::AbstractGrammar, init_node::AbstractRuleNode; with_statistics=false, use_uniformsolver=true, max_size = typemax(Int), max_depth = typemax(Int))
function GenericSolver(grammar::AbstractGrammar, init_node::AbstractRuleNode; with_statistics=false, max_size = typemax(Int), max_depth = typemax(Int))
stats = with_statistics ? SolverStatistics() : nothing
solver = GenericSolver(grammar, nothing, PriorityQueue{AbstractLocalConstraint, Int}(), stats, use_uniformsolver, false, max_size, max_depth)
solver = GenericSolver(grammar, nothing, PriorityQueue{AbstractLocalConstraint, Int}(), stats, false, max_size, max_depth)
new_state!(solver, init_node)
return solver
end
Expand Down

2 comments on commit 52d713c

@ReubenJ
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator register()

Release notes:

Breaking changes

  • Removes the use_uniformsolver field from the GenericSolver

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/125474

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.0 -m "<description of version>" 52d713c65b7d51f4cecd5f426d502d4a163b7768
git push origin v0.3.0

Please sign in to comment.