-
Notifications
You must be signed in to change notification settings - Fork 1
/
IPossibility.cs
36 lines (35 loc) · 1.36 KB
/
IPossibility.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
namespace SudokuSpice.ConstraintBased
{
/// <summary>
/// Defines a possibility in the <see cref="ExactCoverGraph"/>.
/// </summary>
public interface IPossibility
{
/// <summary>
/// True if this possibility is a concrete possibility, i.e. a leaf node in the graph, as
/// opposed to a group of other possibilities.
/// </summary>
public bool IsConcrete { get; }
/// <summary>
/// The current state of this node in the <see cref="ExactCoverGraph"/>.
/// </summary>
public NodeState State { get; }
/// <summary>
/// Appends the linked objective to this possibility.
/// </summary>
internal void AppendObjective(Link toNewObjective);
/// <summary>
/// Undrops this possibility. This must be called from the linked objective.
///
/// This possibility must have been previously dropped from the objective.
/// </summary>
internal void ReturnFromObjective(Link returnSource);
/// <summary>
/// Tries to drop this possibility. This must be called from the linked objective.
/// </summary>
/// <param name="dropSource">
/// Links to the objective that is causing this possibility to be dropped.
/// </param>
internal bool TryDropFromObjective(Link dropSource);
}
}