2using System.Reflection;
32 set => this.value = value;
46 get {
return associatedField; }
99 public override bool Equals(
object obj)
101 if (!(obj is
IElement E) || !(E.AssociatedObjectValue is
bool b))
104 return this.value == b;
110 return this.value.GetHashCode();
128 get {
return False; }
147 if (DesiredType == typeof(
bool))
152 else if (DesiredType.GetTypeInfo().IsAssignableFrom(typeof(
bool).GetTypeInfo()))
Base class for all types of elements.
abstract object AssociatedObjectValue
Associated object value.
Base class for all types of field elements.
Class managing a script expression.
static bool TryConvert(object Value, Type DesiredType, out object Result)
Tries to convert an object Value to an object of type DesiredType .
static string ToString(double Value)
Converts a value to a string, that can be parsed as part of an expression.
override IGroupElement Negate()
Negates the element.
override object AssociatedObjectValue
Associated object value.
override bool Equals(object obj)
Compares the element to another. If elements are equal.
override int GetHashCode()
Calculates a hash code of the element. Hash code.
BooleanValue(bool Value)
Boolean-valued number.
override ICommutativeRingWithIdentityElement One
Returns the identity element of the commutative ring with identity.
static readonly BooleanValue False
Constant false value.
override IField AssociatedField
Associated Field.
override IRingElement Invert()
Inverts the element, if possible.
override string ToString()
override bool TryConvertTo(Type DesiredType, out object Value)
Converts the value to a .NET type.
override ICommutativeRingElement Multiply(ICommutativeRingElement Element)
Tries to multiply an element to the current element.
override IAbelianGroupElement Add(IAbelianGroupElement Element)
Tries to add an element to the current element.
static readonly BooleanValue True
Constant true value.
override IAbelianGroupElement Zero
Returns the zero element of the group.
The field Z_2 of boolean numbers ([0]_2, 0 or false, and [1]_2, 1 or true).
Basic interface for all types of abelian group elements.
Basic interface for all types of commutative ring elements.
Basic interface for all types of commutative ring with identity elements.
Basic interface for all types of elements.
Basic interface for all types of group elements.
Basic interface for all types of ring elements.
Basic interface for all types of fields.