Expand description
Contains the variables which are used by the Solver.
A variable, in the context of the solver, is a view onto a domain. It may forward domain information unaltered, or apply transformations which can be performed without the need of constraints.
We define 2 types of variables:
- Integer Variables (
IntegerVariable) - These are represented byDomainIds when interacting with theSolver. These variables can be created usingSolver::new_bounded_integerwhen creating a variable with the domain between a lower-bound and an upper-bound or usingSolver::new_sparse_integerwhen creating a variable with holes in the domain. These variables can be transformed (according to the traitTransformableVariable) to create anAffineView. - Literals (
Literal) - These specify booleans that can be used when interacting with theSolver. ALiteralcan be created usingSolver::new_literal.
Structs§
- Affine
View - Models the constraint
y = ax + b, by expressing the domain ofyas a transformation of the domain ofx. - Domain
Id - A structure which represents the most basic
IntegerVariable; it is simply the id which links to a domain (hence the name). - Literal
Traits§
- Integer
Variable - A trait specifying the required behaviour of an integer variable such as retrieving a
lower-bound (
IntegerVariable::lower_bound). - Transformable
Variable - Trait for transforming a variable.