Show / Hide Table of Contents

Class Possibility

A concrete possibility in the ExactCoverGraph. This represents a single possible value for a single square in the puzzle.

Inheritance
System.Object
Possibility
Implements
IPossibility
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: SudokuSpice.ConstraintBased
Assembly: SudokuSpice.dll
Syntax
public sealed class Possibility : IPossibility

Properties

| Improve this Doc View Source

Coordinate

The square this possibility is for.

Declaration
public Coordinate Coordinate { get; }
Property Value
Type Description
Coordinate
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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 Source

TryDrop()

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.

Implements

IPossibility
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX