Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
SemanticLiterals.cs
1using System;
5
7{
12 {
16 public static readonly SemanticLiterals Instance = new SemanticLiterals();
17
22 {
23 }
24
30 public override bool Contains(IElement Element)
31 {
32 return Element is ISemanticLiteral;
33 }
34
38 public override int? Size => null;
39
41 public override bool Equals(object obj)
42 {
43 return obj.GetType() == typeof(SemanticLiterals);
44 }
45
47 public override int GetHashCode()
48 {
49 return typeof(SemanticLiterals).GetHashCode();
50 }
51
58 public int Compare(IElement x, IElement y)
59 {
60 if (x is IComparable Left)
61 return Left.CompareTo(y);
62 else
63 return 1;
64 }
65
69 public override bool IsCommutative => false;
70
74 public override IAbelianGroupElement Zero => NullValue.Instance;
75 }
76}
override bool Equals(object obj)
Compares the element to another. If elements are equal.
int Compare(IElement x, IElement y)
Compares two elements.
override bool IsCommutative
If the ring * operator is commutative or not.
override? int Size
Size of set, if finite and known, otherwise null is returned.
override bool Contains(IElement Element)
Checks if the set contains an element.
override int GetHashCode()
Calculates a hash code of the element. Hash code.
static readonly SemanticLiterals Instance
Instance reference to the set of semantic literals.
override IAbelianGroupElement Zero
Returns the zero element of the group.
Base class for all types of elements.
Definition: Element.cs:13
Base class for all types of rings.
Definition: Ring.cs:9
Interface for semantic literals.
Basic interface for all types of abelian group elements.
Basic interface for all types of elements.
Definition: IElement.cs:20
Basic interface for ordered sets.
Definition: IOrderedSet.cs:11