Class Possibility
A concrete possibility in the ExactCoverGraph. This represents a single possible value for a single square in the puzzle.
Inheritance
Implements
Inherited Members
Namespace: SudokuSpice.ConstraintBased
Assembly: SudokuSpice.dll
Syntax
public sealed class Possibility : IPossibility
Properties
| Improve this Doc View SourceCoordinate
The square this possibility is for.
Declaration
public Coordinate Coordinate { get; }
Property Value
Type | Description |
---|---|
Coordinate |
Index
The value index this possibility is for (corresponds to the values in AllPossibleValues).
Declaration
public int Index { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsConcrete
True if this possibility is a concrete possibility, i.e. a leaf node in the graph, as opposed to a group of other possibilities.
Declaration
public bool IsConcrete { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
State
The current state of this node in the ExactCoverGraph.
Declaration
public NodeState State { get; }
Property Value
Type | Description |
---|---|
NodeState |
Methods
| Improve this Doc View SourceTryDrop()
Tries to drop this possibility, if that is compatible with existing objectives.
This is meant to be checked during matrix construction so that constraints can drop possibilities that violate the puzzle's preset values.
If this method fails, it suggests that the current puzzle cannot satisfy all the current constraints.
Declaration
public bool TryDrop()
Returns
Type | Description |
---|---|
System.Boolean | True if the possibility is already dropped or was successfully dropped from all existing objectives, else false. |