CPSolver.ConstraintStore behaviour (Fixpoint v0.10.2)
Constraint store is a key-value store, where key
is a variable id,
and value
is a implementation-dependent structure that allows to
update and keep track of variables' domains.
Summary
Types
@type get_operation() :: CPSolver.Common.domain_get_operation() | nil
@type update_operation() :: CPSolver.Common.domain_update_operation()
Callbacks
@callback dispose(store :: any(), variables :: [CPSolver.Variable.t()]) :: :ok | :not_found
@callback domain(store :: any(), variable :: CPSolver.Variable.t()) :: {:ok, any()} | {:error, any()}
@callback get(store :: any(), variable :: CPSolver.Variable.t(), get_operation(), [any()]) :: {:ok, any()} | {:error, any()}
@callback on_change( store :: any(), variable :: CPSolver.Variable.t(), change :: CPSolver.Common.domain_change() ) :: any()
@callback on_fail(store :: any(), variable :: CPSolver.Variable.t()) :: any()
@callback on_fix(store :: any(), variable :: CPSolver.Variable.t(), value :: any()) :: any()
@callback on_no_change(store :: any(), variable :: CPSolver.Variable.t()) :: any()
@callback update(store :: any(), variable :: CPSolver.Variable.t(), update_operation(), [ any() ]) :: any()
@callback update_domain( store :: any(), variable :: CPSolver.Variable.t(), update_operation(), [any()] ) :: any()