Class Literal<T>
Assembly: NanoByte.SatSolver.dll
Syntax
public sealed class Literal<T> : ValueType where T : IEquatable<T>
Type Parameters
Name |
Description |
T |
The underlying type used to identify/compare Literals.
|
Constructors
Literal(T, Boolean)
Declaration
public Literal(T value, bool negated = false)
Parameters
Type |
Name |
Description |
T |
value |
The underlying value used to identify/compare Literals.
|
Boolean |
negated |
Indicates whether this Literal has been negated.
|
Properties
Negated
Indicates whether this Literal has been negated.
Declaration
public bool Negated { get; }
Property Value
Value
The underlying value used to identify/compare Literals.
Declaration
Property Value
Methods
ConflictsWith(Literal<T>)
Checks whether this Literal conflicts with the given literal
.
Declaration
public bool ConflictsWith(Literal<T> literal)
Parameters
Type |
Name |
Description |
Literal<T> |
literal |
|
Returns
Equals(Literal<T>)
Declaration
public bool Equals(Literal<T> other)
Parameters
Type |
Name |
Description |
Literal<T> |
other |
|
Returns
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
IsPure(IEnumerable<Literal<T>>)
Checks whether this Literal conflicts with any of the given literals
.
Declaration
public bool IsPure(IEnumerable<Literal<T>> literals)
Parameters
Returns
Negate()
Returns a negated copy of this Literal.
Declaration
public Literal<T> Negate()
Returns
ToString()
Declaration
public override string ToString()
Returns
Operators
BitwiseAnd(Literal<T>, Literal<T>)
Declaration
public static Formula<T> operator &(Literal<T> literal1, Literal<T> literal2)
Parameters
Type |
Name |
Description |
Literal<T> |
literal1 |
The Literal in the first Clause.
|
Literal<T> |
literal2 |
The Literal in the second Clause.
|
Returns
BitwiseOr(Literal<T>, Literal<T>)
Declaration
public static Clause<T> operator |(Literal<T> literal1, Literal<T> literal2)
Parameters
Type |
Name |
Description |
Literal<T> |
literal1 |
The first Literal in the Clause.
|
Literal<T> |
literal2 |
The second Literal in the Clause.
|
Returns
Equality(Literal<T>, Literal<T>)
Declaration
public static bool operator ==(Literal<T> left, Literal<T> right)
Parameters
Returns
Implicit(T to Literal<T>)
Declaration
public static implicit operator Literal<T>(T value)
Parameters
Type |
Name |
Description |
T |
value |
The underlying value used to identify/compare Literals.
|
Returns
Implicit(Literal<T> to Clause<T>)
Declaration
public static implicit operator Clause<T>(Literal<T> literal)
Parameters
Type |
Name |
Description |
Literal<T> |
literal |
The single Literal in the Clause.
|
Returns
Inequality(Literal<T>, Literal<T>)
Declaration
public static bool operator !=(Literal<T> left, Literal<T> right)
Parameters
Returns
LogicalNot(Literal<T>)
Returns a negated copy of this Literal.
Declaration
public static Literal<T> operator !(Literal<T> literal)
Parameters
Type |
Name |
Description |
Literal<T> |
literal |
|
Returns
Implements