Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
DoubleMatrix.cs
1using System;
3using System.Text;
11
13{
17 public sealed class DoubleMatrix : RingElement, IMatrix
18 {
19 private double[,] values;
20 private IElement[,] matrixElements;
21 private ICollection<IElement> elements;
22 private readonly int rows;
23 private readonly int columns;
24
29 public DoubleMatrix(double[,] Values)
30 {
31 this.values = Values;
32 this.elements = null;
33 this.matrixElements = null;
34 this.rows = Values.GetLength(0);
35 this.columns = Values.GetLength(1);
36 }
37
44 public DoubleMatrix(int Rows, int Columns, ICollection<IElement> Elements)
45 {
46 this.values = null;
47 this.matrixElements = null;
48 this.elements = Elements;
49 this.rows = Rows;
50 this.columns = Columns;
51 }
52
56 public double[,] Values
57 {
58 get
59 {
60 if (this.values is null)
61 {
62 double[,] v = new double[this.rows, this.columns];
63 int x = 0;
64 int y = 0;
65
66 if (this.elements is ChunkedList<IElement> Values)
67 {
68 ChunkNode<IElement> Loop = Values.FirstChunk;
69 int i, c;
70
71 while (!(Loop is null))
72 {
73 for (i = Loop.Start, c = Loop.Pos; i < c; i++)
74 {
75 if (!(Loop[i].AssociatedObjectValue is double d))
76 d = 0;
77
78 v[y, x++] = d;
79 if (x >= this.columns)
80 {
81 y++;
82 x = 0;
83 }
84 }
85
86 Loop = Loop.Next;
87 }
88 }
89 else
90 {
91 foreach (IElement E in this.elements)
92 {
93 if (!(E.AssociatedObjectValue is double d))
94 d = 0;
95
96 v[y, x++] = d;
97 if (x >= this.columns)
98 {
99 y++;
100 x = 0;
101 }
102 }
103 }
104
105 this.values = v;
106 }
107
108 return this.values;
109 }
110 }
111
115 public ICollection<IElement> Elements
116 {
117 get
118 {
119 if (this.elements is null)
120 {
121 int x, y, i = 0;
122 IElement[] v = new IElement[this.rows * this.columns];
123
124 for (y = 0; y < this.rows; y++)
125 {
126 for (x = 0; x < this.columns; x++)
127 v[i++] = new DoubleNumber(this.values[y, x]);
128 }
129
130 this.elements = v;
131 }
132
133 return this.elements;
134 }
135 }
136
141 {
142 get
143 {
144 if (this.matrixElements is null)
145 {
146 IElement[,] v = new IElement[this.rows, this.columns];
147 int x = 0;
148 int y = 0;
149
150 foreach (IElement E in this.Elements)
151 {
152 v[y, x++] = E;
153 if (x >= this.columns)
154 {
155 y++;
156 x = 0;
157 }
158 }
159
160 this.matrixElements = v;
161 }
162
163 return this.matrixElements;
164 }
165 }
166
170 public int Rows => this.rows;
171
175 public int Columns => this.columns;
176
178 public override string ToString()
179 {
180 double[,] v = this.Values;
181 StringBuilder sb = null;
182 bool First;
183 int x, y;
184
185 for (y = 0; y < this.rows; y++)
186 {
187 if (sb is null)
188 sb = new StringBuilder("[[");
189 else
190 sb.Append(",\r\n [");
191
192 First = true;
193 for (x = 0; x < this.columns; x++)
194 {
195 if (First)
196 First = false;
197 else
198 sb.Append(", ");
199
200 sb.Append(Expression.ToString(v[y, x]));
201 }
202
203 sb.Append(']');
204 }
205
206 if (sb is null)
207 sb = new StringBuilder("[[]]");
208 else
209 sb.Append(']');
210
211 return sb.ToString();
212 }
213
217 public override IRing AssociatedRing
218 {
219 get
220 {
221 if (this.associatedMatrixSpace is null)
222 this.associatedMatrixSpace = new DoubleMatrices(this.rows, this.columns);
223
224 return this.associatedMatrixSpace;
225 }
226 }
227
228 private DoubleMatrices associatedMatrixSpace = null;
229
233 public override object AssociatedObjectValue => this;
234
241 {
242 double[,] v;
243 int x, y, z;
244
245 if (Element.AssociatedObjectValue is double n)
246 {
247 double[,] Values = this.Values;
248
249 v = new double[this.rows, this.columns];
250
251 for (y = 0; y < this.rows; y++)
252 {
253 for (x = 0; x < this.columns; x++)
254 v[y, x] = n * Values[y, x];
255 }
256
257 return new DoubleMatrix(v);
258 }
259 else if (Element is DoubleMatrix Matrix)
260 {
261 if (Matrix.columns != this.rows)
262 return null;
263
264 double[,] Values = this.Values;
265 double[,] Values2 = Matrix.Values;
266
267 v = new double[Matrix.rows, this.columns];
268 for (y = 0; y < Matrix.rows; y++)
269 {
270 for (x = 0; x < this.columns; x++)
271 {
272 n = 0;
273
274 for (z = 0; z < this.rows; z++)
275 n += Values2[y, z] * Values[z, x];
276
277 v[y, x] = n;
278 }
279 }
280
281 return new DoubleMatrix(v);
282 }
283 else if (Element is IMatrix)
284 return new ObjectMatrix(this.MatrixElements).MultiplyLeft(Element);
285 else
286 return null;
287 }
288
295 {
296 double[,] v;
297 int x, y, z;
298
299 if (Element.AssociatedObjectValue is double n)
300 {
301 double[,] Values = this.Values;
302
303 v = new double[this.rows, this.columns];
304
305 for (y = 0; y < this.rows; y++)
306 {
307 for (x = 0; x < this.columns; x++)
308 v[y, x] = n * Values[y, x];
309 }
310
311 return new DoubleMatrix(v);
312 }
313 else if (Element is DoubleMatrix Matrix)
314 {
315 if (this.columns != Matrix.rows)
316 return null;
317
318 double[,] Values = this.Values;
319 double[,] Values2 = Matrix.Values;
320
321 v = new double[this.rows, Matrix.columns];
322 for (y = 0; y < this.rows; y++)
323 {
324 for (x = 0; x < Matrix.columns; x++)
325 {
326 n = 0;
327
328 for (z = 0; z < this.columns; z++)
329 n += Values[y, z] * Values2[z, x];
330
331 v[y, x] = n;
332 }
333 }
334
335 return new DoubleMatrix(v);
336 }
337 else if (Element is IMatrix)
338 return new ObjectMatrix(this.MatrixElements).MultiplyRight(Element);
339 else
340 return null;
341 }
342
347 public override IRingElement Invert()
348 {
349 if (this.rows != this.columns)
350 return null;
351
352 double[,] Values = this.Values;
353 int c2 = this.columns << 1;
354 double[,] v = new double[this.rows, c2];
355 int x, y;
356
357 for (y = 0; y < this.rows; y++)
358 {
359 for (x = 0; x < this.columns; x++)
360 {
361 v[y, x] = Values[y, x];
362 v[y, x + this.columns] = (x == y ? 1 : 0);
363 }
364 }
365
366 if (Reduce(v, true, true, out _) < 0)
367 return null;
368
369 double[,] v2 = new double[this.rows, this.columns];
370
371 for (y = 0; y < this.rows; y++)
372 {
373 for (x = 0; x < this.columns; x++)
374 v2[y, x] = v[y, x + this.columns];
375 }
376
377 return new DoubleMatrix(v2);
378 }
379
391 public IMatrix Reduce(bool Eliminate, bool BreakIfZero, out int Rank, out ICommutativeRingWithIdentityElement Factor)
392 {
393 double[,] M = (double[,])this.Values.Clone();
394 Rank = Reduce(M, Eliminate, BreakIfZero, out double c);
395 Factor = new DoubleNumber(c);
396 return new DoubleMatrix(M);
397 }
398
410 public static int Reduce(double[,] Matrix, bool Eliminate, bool BreakIfZero,
411 out double Factor)
412 {
413 int x, y, u, z;
414 int Rows = Matrix.GetLength(0);
415 int Columns = Matrix.GetLength(1);
416 int MinCount = Math.Min(Rows, Columns);
417 double a, b;
418 int Rank = 0;
419
420 Factor = 1;
421
422 for (x = 0; x < MinCount; x++)
423 {
424 a = Math.Abs(Matrix[x, x]);
425 z = x;
426 for (y = x + 1; y < Rows; y++)
427 {
428 b = Math.Abs(Matrix[y, x]);
429 if (b > a)
430 {
431 a = b;
432 z = y;
433 }
434 }
435
436 if (z != x)
437 {
438 for (u = x; u < Columns; u++)
439 {
440 a = Matrix[x, u];
441 Matrix[x, u] = Matrix[z, u];
442 Matrix[z, u] = a;
443 }
444
445 Factor = -Factor;
446 }
447
448 a = Matrix[x, x];
449 if (a == 0)
450 {
451 if (BreakIfZero)
452 return -1;
453 }
454 else
455 {
456 Rank++;
457
458 if (a != 1)
459 {
460 for (u = x; u < Columns; u++)
461 Matrix[x, u] /= a;
462
463 Factor *= a;
464 }
465
466 for (y = Eliminate ? 0 : x + 1; y < Rows; y++)
467 {
468 if (y != x && (a = Matrix[y, x]) != 0)
469 {
470 for (u = x; u < Columns; u++)
471 Matrix[y, u] -= a * Matrix[x, u];
472 }
473 }
474 }
475 }
476
477 return Rank;
478 }
479
486 {
487 double[,] v;
488 int x, y;
489
490 if (Element.AssociatedObjectValue is double d)
491 {
492 double[,] Values = this.Values;
493
494 v = new double[this.rows, this.columns];
495
496 for (y = 0; y < this.rows; y++)
497 {
498 for (x = 0; x < this.columns; x++)
499 v[y, x] = d + Values[y, x];
500 }
501
502 return new DoubleMatrix(v);
503 }
504 else if (Element is DoubleMatrix Matrix)
505 {
506 if (this.columns != Matrix.columns || this.rows != Matrix.rows)
507 return null;
508
509 double[,] Values = this.Values;
510 double[,] Values2 = Matrix.Values;
511
512 v = new double[this.rows, this.columns];
513 for (y = 0; y < this.rows; y++)
514 {
515 for (x = 0; x < this.columns; x++)
516 v[y, x] = Values[y, x] + Values2[y, x];
517 }
518
519 return new DoubleMatrix(v);
520 }
521 else if (Element is IMatrix)
522 return new ObjectMatrix(this.MatrixElements).Add(Element);
523 else
524 return null;
525 }
526
531 public override IGroupElement Negate()
532 {
533 double[,] Values = this.Values;
534 double[,] v = new double[this.rows, this.columns];
535 int x, y;
536
537 for (y = 0; y < this.rows; y++)
538 {
539 for (x = 0; x < this.columns; x++)
540 v[y, x] = -Values[y, x];
541 }
542
543 return new DoubleMatrix(v);
544 }
545
551 public override bool Equals(object obj)
552 {
553 if (obj is DoubleMatrix Matrix)
554 {
555 if (this.columns != Matrix.columns || this.rows != Matrix.rows)
556 return false;
557
558 double[,] V1 = this.Values;
559 double[,] V2 = Matrix.Values;
560 int x, y;
561
562 for (y = 0; y < this.rows; y++)
563 {
564 for (x = 0; x < this.columns; x++)
565 {
566 if (V1[y, x] != V2[y, x])
567 return false;
568 }
569 }
570
571 return true;
572 }
573 else if (obj is IMatrix)
574 return new ObjectMatrix(this.MatrixElements).Equals(obj);
575 else
576 return false;
577 }
578
583 public override int GetHashCode()
584 {
585 double[,] Values = this.Values;
586 int Result = 0;
587 int x, y;
588
589 for (y = 0; y < this.rows; y++)
590 {
591 for (x = 0; x < this.columns; x++)
592 Result ^= Values[y, x].GetHashCode();
593 }
594
595 return Result;
596 }
597
601 public override bool IsScalar => false;
602
606 public override ICollection<IElement> ChildElements => this.Elements;
607
615 {
616 return MatrixDefinition.Encapsulate(Elements, this.rows, this.columns, Node);
617 }
618
625 public override IElement Encapsulate(ICollection<IElement> Elements, ScriptNode Node)
626 {
627 return MatrixDefinition.Encapsulate(Elements, this.rows, this.columns, Node);
628 }
629
634 {
635 get
636 {
637 if (this.zero is null)
638 this.zero = new DoubleMatrix(new double[this.rows, this.columns]);
639
640 return this.zero;
641 }
642 }
643
644 private DoubleMatrix zero = null;
645
649 public int Dimension => this.rows;
650
654 public ICollection<IElement> VectorElements
655 {
656 get
657 {
658 if (!(this.rowVectors is null))
659 return this.rowVectors;
660
661 double[,] v = this.Values;
663 int x, y;
664 double[] r;
665
666 for (y = 0; y < this.rows; y++)
667 {
668 r = new double[this.columns];
669
670 for (x = 0; x < this.columns; x++)
671 r[x] = v[y, x];
672
673 Rows.Add(new DoubleVector(r));
674 }
675
676 this.rowVectors = Rows;
677 return Rows;
678 }
679 }
680
681 private ChunkedList<IElement> rowVectors = null;
682
688 {
689 double[,] v = new double[this.columns, this.rows];
690 double[,] Values = this.Values;
691 int x, y;
692
693 for (y = 0; y < this.rows; y++)
694 {
695 for (x = 0; x < this.columns; x++)
696 v[x, y] = Values[y, x];
697 }
698
699 return new DoubleMatrix(v);
700 }
701
707 {
708 return this.Transpose();
709 }
710
716 public IElement GetElement(int Index)
717 {
718 if (Index < 0 || Index >= this.rows)
719 throw new ScriptException("Index out of bounds.");
720
721 double[,] M = this.Values;
722 double[] V = new double[this.columns];
723 int i;
724
725 for (i = 0; i < this.columns; i++)
726 V[i] = M[Index, i];
727
728 return new DoubleVector(V);
729 }
730
736 public void SetElement(int Index, IElement Value)
737 {
738 if (Index < 0 || Index >= this.rows)
739 throw new ScriptException("Index out of bounds.");
740
741 if (!(Value is DoubleVector V))
742 throw new ScriptException("Row vectors in a double matrix are required to be double vectors.");
743
744 if (V.Dimension != this.columns)
745 throw new ScriptException("Dimension mismatch.");
746
747 double[] V2 = V.Values;
748 double[,] M = this.Values;
749 this.elements = null;
750
751 int i;
752
753 for (i = 0; i < this.columns; i++)
754 M[Index, i] = V2[i];
755 }
756
763 public IElement GetElement(int Column, int Row)
764 {
765 if (Column < 0 || Column >= this.columns || Row < 0 || Row >= this.rows)
766 throw new ScriptException("Index out of bounds.");
767
768 return new DoubleNumber(this.Values[Row, Column]);
769 }
770
777 public void SetElement(int Column, int Row, IElement Value)
778 {
779 if (Column < 0 || Column >= this.columns || Row < 0 || Row >= this.rows)
780 throw new ScriptException("Index out of bounds.");
781
782 if (!(Value.AssociatedObjectValue is double d))
783 throw new ScriptException("Elements in a double matrix must be double values.");
784
785 double[,] M = this.Values;
786 this.elements = null;
787
788 M[Row, Column] = d;
789 }
790
796 public IVector GetRow(int Row)
797 {
798 if (Row < 0 || Row >= this.rows)
799 throw new ScriptException("Index out of bounds.");
800
801 double[,] M = this.Values;
802 double[] V = new double[this.columns];
803 int i;
804
805 for (i = 0; i < this.columns; i++)
806 V[i] = M[Row, i];
807
808 return new DoubleVector(V);
809 }
810
816 public IVector GetColumn(int Column)
817 {
818 if (Column < 0 || Column >= this.columns)
819 throw new ScriptException("Index out of bounds.");
820
821 double[,] M = this.Values;
822 double[] V = new double[this.rows];
823 int i;
824
825 for (i = 0; i < this.rows; i++)
826 V[i] = M[i, Column];
827
828 return new DoubleVector(V);
829 }
830
836 public void SetRow(int Row, IVector Vector)
837 {
838 if (Row < 0 || Row >= this.rows)
839 throw new ScriptException("Index out of bounds.");
840
841 if (Vector.Dimension != this.columns)
842 throw new ScriptException("Vector dimension does not match number of columns");
843
844 if (!(Vector is DoubleVector V))
845 throw new ScriptException("Row vectors in a double matrix must be double vectors.");
846
847 double[] V2 = V.Values;
848 double[,] M = this.Values;
849 this.elements = null;
850 int i;
851
852 for (i = 0; i < this.columns; i++)
853 M[Row, i] = V2[i];
854 }
855
861 public void SetColumn(int Column, IVector Vector)
862 {
863 if (Column < 0 || Column >= this.columns)
864 throw new ScriptException("Index out of bounds.");
865
866 if (Vector.Dimension != this.rows)
867 throw new ScriptException("Vector dimension does not match number of rows");
868
869 if (!(Vector is DoubleVector V))
870 throw new ScriptException("Column vectors in a double matrix must be double vectors.");
871
872 double[] V2 = V.Values;
873 double[,] M = this.Values;
874 this.elements = null;
875 int i;
876
877 for (i = 0; i < this.rows; i++)
878 M[i, Column] = V2[i];
879 }
880
889 public bool TryFind(IElement Element, out int Column, out int Row)
890 {
891 return this.TryFind(Element, 0, 0, out Column, out Row);
892 }
893
904 public bool TryFind(IElement Element, int FromColumn, int FromRow, out int Column, out int Row)
905 {
906 if (Element is DoubleNumber D)
907 return this.TryFind(D.Value, FromColumn, FromRow, out Column, out Row);
908 else
909 {
910 Column = -1;
911 Row = -1;
912 return false;
913 }
914 }
915
926 public bool TryFind(double Element, int FromColumn, int FromRow, out int Column, out int Row)
927 {
928 double[,] Values = this.Values;
929
930 while (FromRow < this.rows)
931 {
932 while (FromColumn < this.columns)
933 {
934 if (Values[FromRow, FromColumn] == Element)
935 {
936 Column = FromColumn;
937 Row = FromRow;
938
939 return true;
940 }
941
942 FromColumn++;
943 }
944
945 FromColumn = 0;
946 FromRow++;
947 }
948
949 Column = -1;
950 Row = -1;
951
952 return false;
953 }
954
963 public bool TryFindLast(IElement Element, out int Column, out int Row)
964 {
965 return this.TryFindLast(Element, this.columns - 1, this.rows - 1, out Column, out Row);
966 }
967
978 public bool TryFindLast(IElement Element, int FromColumn, int FromRow, out int Column, out int Row)
979 {
980 if (Element is DoubleNumber D)
981 return this.TryFindLast(D.Value, FromColumn, FromRow, out Column, out Row);
982 else
983 {
984 Column = -1;
985 Row = -1;
986 return false;
987 }
988 }
989
1000 public bool TryFindLast(double Element, int FromColumn, int FromRow, out int Column, out int Row)
1001 {
1002 double[,] Values = this.Values;
1003
1004 while (FromRow >= 0)
1005 {
1006 while (FromColumn >= 0)
1007 {
1008 if (Values[FromRow, FromColumn] == Element)
1009 {
1010 Column = FromColumn;
1011 Row = FromRow;
1012
1013 return true;
1014 }
1015
1016 FromColumn--;
1017 }
1018
1019 FromColumn = this.columns - 1;
1020 FromRow--;
1021 }
1022
1023 Column = -1;
1024 Row = -1;
1025
1026 return false;
1027 }
1028
1029 }
1030}
Node referencing a chunk in a ChunkedList<T>
Definition: ChunkNode.cs:11
ChunkNode< T > Next
Next chunk
Definition: ChunkNode.cs:26
int Pos
Index after the last element in chunk.
Definition: ChunkNode.cs:51
int Start
Index of first element in chunk.
Definition: ChunkNode.cs:46
A chunked list is a linked list of chunks of objects of type T .
Definition: ChunkedList.cs:54
Base class for all types of elements.
Definition: Element.cs:14
abstract object AssociatedObjectValue
Associated object value.
Definition: Element.cs:43
Base class for all types of ring elements.
Definition: RingElement.cs:10
Base class for script exceptions.
Class managing a script expression.
Definition: Expression.cs:41
static string ToString(double Value)
Converts a value to a string, that can be parsed as part of an expression.
Definition: Expression.cs:4760
Base class for all nodes in a parsed script tree.
Definition: ScriptNode.cs:69
Pseudo-ring of Double-valued matrices.
IElement GetElement(int Column, int Row)
Gets an element of the matrix.
IMatrix Reduce(bool Eliminate, bool BreakIfZero, out int Rank, out ICommutativeRingWithIdentityElement Factor)
Reduces a matrix.
bool TryFind(IElement Element, int FromColumn, int FromRow, out int Column, out int Row)
Tries to find an element in the matrix, continuing search from a given position in the matrix....
void SetColumn(int Column, IVector Vector)
Gets a column vector from the matrix.
override ICollection< IElement > ChildElements
An enumeration of child elements. If the element is a scalar, this property will return null.
static int Reduce(double[,] Matrix, bool Eliminate, bool BreakIfZero, out double Factor)
Reduces a matrix.
IElement GetElement(int Index)
Gets an element of the vector.
DoubleMatrix(int Rows, int Columns, ICollection< IElement > Elements)
Double-valued vector.
Definition: DoubleMatrix.cs:44
override IGroupElement Negate()
Negates the element.
override bool IsScalar
If the element represents a scalar value.
void SetElement(int Index, IElement Value)
Sets an element in the vector.
int Dimension
Dimension of matrix, if seen as a vector of row vectors.
IMatrix Transpose()
Returns a transposed matrix.
override bool Equals(object obj)
Compares the element to another.
IElement[,] MatrixElements
Matrix elements
double[,] Values
Matrix element values.
Definition: DoubleMatrix.cs:57
override object AssociatedObjectValue
Associated object value.
IVector GetRow(int Row)
Gets a row vector from the matrix.
void SetElement(int Column, int Row, IElement Value)
Sets an element in the matrix.
override IRing AssociatedRing
Associated Ring.
override IElement Encapsulate(ChunkedList< IElement > Elements, ScriptNode Node)
Encapsulates a set of elements into a similar structure as that provided by the current element.
ICollection< IElement > VectorElements
Vector of row vectors.
DoubleMatrix(double[,] Values)
Double-valued matrix.
Definition: DoubleMatrix.cs:29
bool TryFindLast(IElement Element, int FromColumn, int FromRow, out int Column, out int Row)
Tries to find the last element in the matrix, continuing search from a given position in the matrix....
override IRingElement MultiplyLeft(IRingElement Element)
Tries to multiply an element to the current element, from the left.
IMatrix ConjugateTranspose()
Returns a conjugate transposed matrix.
bool TryFind(double Element, int FromColumn, int FromRow, out int Column, out int Row)
Tries to find an element in the matrix, continuing search from a given position in the matrix....
override IElement Encapsulate(ICollection< IElement > Elements, ScriptNode Node)
Encapsulates a set of elements into a similar structure as that provided by the current element.
bool TryFind(IElement Element, out int Column, out int Row)
Tries to find an element in the matrix. Search is done, left to right, top to bottom.
override IRingElement MultiplyRight(IRingElement Element)
Tries to multiply an element to the current element, from the right.
override IRingElement Invert()
Inverts the element, if possible.
IVector GetColumn(int Column)
Gets a column vector from the matrix.
void SetRow(int Row, IVector Vector)
Gets a row vector from the matrix.
bool TryFindLast(IElement Element, out int Column, out int Row)
Tries to find the last element in the matrix. Search is done, right to left, bottom to top.
ICollection< IElement > Elements
Matrix elements.
override IAbelianGroupElement Zero
Returns the zero element of the group.
bool TryFindLast(double Element, int FromColumn, int FromRow, out int Column, out int Row)
Tries to find the last element in the matrix, continuing search from a given position in the matrix....
override int GetHashCode()
Calculates a hash code of the element.
override IAbelianGroupElement Add(IAbelianGroupElement Element)
Tries to add an element to the current element.
override IRingElement MultiplyRight(IRingElement Element)
Tries to multiply an element to the current element, from the right.
override IAbelianGroupElement Add(IAbelianGroupElement Element)
Tries to add an element to the current element.
override IRingElement MultiplyLeft(IRingElement Element)
Tries to multiply an element to the current element, from the left.
override bool Equals(object obj)
Compares the element to another.
static IMatrix Encapsulate(ICollection< IElement > Rows, ScriptNode Node)
Encapsulates the elements of a matrix.
Basic interface for all types of abelian group elements.
Basic interface for all types of commutative ring with identity elements.
Basic interface for all types of elements.
Definition: IElement.cs:21
object AssociatedObjectValue
Associated object value.
Definition: IElement.cs:34
Basic interface for all types of group elements.
Definition: IGroupElement.cs:9
Basic interface for matrices.
Definition: IMatrix.cs:7
Basic interface for all types of ring elements.
Definition: IRingElement.cs:10
Basic interface for vectors.
Definition: IVector.cs:9
int Dimension
Dimension of vector.
Definition: IVector.cs:14
Basic interface for all types of rings.
Definition: IRing.cs:10
Definition: ImplTypes.g.cs:58