Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
SetOfGraphs.cs
1using System;
4
6{
10 public sealed class SetOfGraphs : SemiGroup
11 {
12 private static readonly int hashCode = typeof(SetOfGraphs).GetHashCode();
13
17 public SetOfGraphs()
18 {
19 }
20
24 public static readonly SetOfGraphs Instance = new SetOfGraphs();
25
31 public override bool Contains(IElement Element)
32 {
33 return Element is Graph;
34 }
35
41 public override bool Equals(object obj)
42 {
43 return obj is SetOfGraphs;
44 }
45
50 public override int GetHashCode()
51 {
52 return hashCode;
53 }
54 }
55}
Base class for all types of elements.
Definition: Element.cs:13
Base class for all types of semigroups.
Definition: SemiGroup.cs:10
abstract override int GetHashCode()
Calculates a hash code of the element.
Base class for graphs.
Definition: Graph.cs:79
Set containing all graphs.
Definition: SetOfGraphs.cs:11
override bool Contains(IElement Element)
Checks if the set contains an element.
Definition: SetOfGraphs.cs:31
override bool Equals(object obj)
Compares the element to another.
Definition: SetOfGraphs.cs:41
SetOfGraphs()
Set containing all graphs.
Definition: SetOfGraphs.cs:17
override int GetHashCode()
Calculates a hash code of the element.
Definition: SetOfGraphs.cs:50
static readonly SetOfGraphs Instance
Instance of the set of all graphs.
Definition: SetOfGraphs.cs:24
Basic interface for all types of elements.
Definition: IElement.cs:20