Show / Hide Table of Contents

Class PossibleValues

Tracks per-square possible values for a puzzle.

Inheritance
System.Object
PossibleValues
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.RuleBased
Assembly: SudokuSpice.dll
Syntax
public class PossibleValues

Constructors

| Improve this Doc View Source

PossibleValues(PossibleValues)

Copy-constructor to provide a deep copy.

Declaration
public PossibleValues(PossibleValues existing)
Parameters
Type Name Description
PossibleValues existing

The existing PossibleValues object that you want to copy.

| Improve this Doc View Source

PossibleValues(Int32, BitVector)

Constructs a PossibleValues object to track possible values for a size-x-size puzzle. All coordinates are initialized to uniquePossibleValues possible values.

Declaration
public PossibleValues(int size, BitVector uniquePossibleValues)
Parameters
Type Name Description
System.Int32 size

The size of the puzzle for which we want to track possible values.

BitVector uniquePossibleValues

The full set of possible values for any given square in this puzzle.

Properties

| Improve this Doc View Source

AllPossible

Returns a BitVector for the complete set of possible values for any given square in the puzzle represented by this PossibleValues object.

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

Item[Coordinate]

Provides read and write access to the possible values for the given square.

Declaration
public BitVector this[in Coordinate c] { get; set; }
Parameters
Type Name Description
Coordinate c

The Coordinate of the square.

Property Value
Type Description
BitVector

The possible values for that square as a BitVector.

Methods

| Improve this Doc View Source

Intersect(Coordinate, BitVector)

Updates the possible values for the square at the given Coordinate to be the intersect of their current value and the given possibleValues.

Declaration
public void Intersect(in Coordinate c, BitVector possibleValues)
Parameters
Type Name Description
Coordinate c

The Coordinate of the square to update.

BitVector possibleValues

The possible values to intersect with.

| Improve this Doc View Source

Reset(Coordinate)

Resets the possible values for the given Coordinate to the full set of possible values for this puzzle.

Declaration
public void Reset(in Coordinate c)
Parameters
Type Name Description
Coordinate c

The Coordinate of the square to reset.

| Improve this Doc View Source

Reset(ReadOnlySpan<Coordinate>)

Resets the possible values to AllPossible at the given coordinates.

Declaration
public void Reset(ReadOnlySpan<Coordinate> coordinates)
Parameters
Type Name Description
System.ReadOnlySpan<Coordinate> coordinates
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX