Constraint class
A relationship between two expressions (represented by Expression) that the Solver tries to hold true. In case of ambiguities, the Solver will use priorities to determine Constraint precedence. Once a Constraint is added to the Solver, this Priority cannot be changed.
Constructors
- Constraint(Expression expression, Relation relation)
-
Creates a new Constraint by specifying a single Expression. This
assumes that the right hand side Expression is the constant zero.
(
<expression> <relation> <0>
)
Properties
- expression → Expression
-
The Constraint Expression. The Expression on the right hand side of
constraint must be zero. If the Expression on the right is not zero,
it must be negated from the left hand Expression before a Constraint
can be created.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- priority ↔ double
-
The Constraint Priority. The Priority can only be modified when the
Constraint is being created. Once it is added to the solver,
modifications to the Constraint Priority will have no effect on the
how the solver evaluates the constraint.
getter/setter pair
- relation → Relation
-
The Relation between a Constraint Expression and zero.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator |(
double p) → Constraint -
The operator
|
is overloaded as a convenience so that constraint priorities can be specifed along with the Constraint expression.