Class AtMostOneConstraint<T>
A constraint that no more than one of its literals may be true.
public sealed class AtMostOneConstraint<T> where T : IEquatable<T>
Type Parameters
T
- Inheritance
-
objectAtMostOneConstraint<T>
Properties
Selected
The literal that has been assigned true, or null if no such assignment has been made yet. Recomputed from current state, so it reflects the engine after backtracking.
public Literal<T>? Selected { get; }
Property Value
- Literal<T>?
Methods
BestUndecided()
Returns the first undecided literal in declaration order, or null if none remain or one has already been selected.
Useful for deciders that want to bias selection toward earlier (preferred) candidates.
public Literal<T>? BestUndecided()
Returns
- Literal<T>?