diff --git a/README.md b/README.md index 5fbbec7..f4fc51c 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,10 @@ # Constraints.jl -A back-end pacage for JuliaConstraints front packages, such as `LocalSearchSolvers.jl`. +A back-end package for JuliaConstraints front packages, such as `LocalSearchSolvers.jl`. It provides the following features: -- A dictionary to store usual constraint: `usual_contraint`, which contains the following entries +- A dictionary to store usual constraint: `usual_constraint`, which contains the following entries - `:all_different` - `:dist_different` - `:eq`, `:all_equal`, `:all_equal_param` @@ -23,7 +23,7 @@ It provides the following features: - error (a function that evaluate how much `c` is violated) - parameters length - known symmetries of `c` -- A learning function using `CompositionalNetworks.jl`. If no error function is given when instanciating `c`, it will check the existence of a composition related to `c` and set the error to it. +- A learning function using `CompositionalNetworks.jl`. If no error function is given when instantiating `c`, it will check the existence of a composition related to `c` and set the error to it. ## Contributing diff --git a/src/constraint.jl b/src/constraint.jl index a714223..83417c4 100644 --- a/src/constraint.jl +++ b/src/constraint.jl @@ -6,9 +6,9 @@ const USUAL_SYMMETRIES = Dict(:permutable => sort) """ Constraint -Parametric stucture with the following fields. +Parametric structure with the following fields. - `concept`: a Boolean function that, given an assignment `x`, outputs `true` if `x` satisfies the constraint, and `false` otherwise. -- `error`: a positive function that works as preferences over invalid assignements. Return `0.0` if the constraint is satisfied, and a strictly positive real otherwise. +- `error`: a positive function that works as preferences over invalid assignments. Return `0.0` if the constraint is satisfied, and a strictly positive real otherwise. """ mutable struct Constraint{FConcept <: Function, FError <: Function} args::Int