Пример #1
0
        public Matrix Row(int index)
        {
            if (index < 0 || index > Size.rows - 1)
            {
                return(null);
            }
            var row = new MElement[1, Size.cols];

            for (int i = 0; i < Size.cols; i++)
            {
                row[0, i] = this[index, i];
            }
            return(new Matrix(row));
        }
Пример #2
0
        public Matrix Col(int index)
        {
            if (index < 0 || index > Size.cols - 1)
            {
                return(null);
            }
            var col = new MElement[Size.rows, 1];

            for (int i = 0; i < Size.rows; i++)
            {
                col[i, 0] = this[i, index];
            }
            return(new Matrix(col));
        }
Пример #3
0
 public override MElement AddTo(MElement other) => other is MNumeric number ? _value + number._value : other + this;
Пример #4
0
 public abstract bool Equals(MElement other);
Пример #5
0
 public abstract MElement MultiplyTo(MElement other);
Пример #6
0
 public abstract MElement AddTo(MElement other);
Пример #7
0
 public override MElement AddTo(MElement other) => other switch
 {