Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
SemiGroup.cs
1using System;
3
5{
9 public abstract class SemiGroup : Set, ISemiGroup
10 {
14 public SemiGroup()
15 : base()
16 {
17 }
18
26 {
27 ISemiGroupElement Result;
28
29 Result = Left.AddRight(Right);
30 if (!(Result is null))
31 return Result;
32
33 Result = Right.AddLeft(Left);
34 if (!(Result is null))
35 return Result;
36
37 return null;
38 }
39 }
40}
Base class for all types of semigroups.
Definition: SemiGroup.cs:10
virtual ISemiGroupElement Add(ISemiGroupElement Left, ISemiGroupElement Right)
Adds two semigroup elements, if possible.
Definition: SemiGroup.cs:25
SemiGroup()
Base class for all types of semigroups.
Definition: SemiGroup.cs:14
Base class for all types of sets.
Definition: Set.cs:14
Basic interface for all types of semigroup elements.
ISemiGroupElement AddRight(ISemiGroupElement Element)
Tries to add an element to the current element, from the right.
ISemiGroupElement AddLeft(ISemiGroupElement Element)
Tries to add an element to the current element, from the left.
Basic interface for all types of semigroups.
Definition: ISemiGroup.cs:10