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)); }
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)); }
public override MElement AddTo(MElement other) => other is MNumeric number ? _value + number._value : other + this;
public abstract bool Equals(MElement other);
public abstract MElement MultiplyTo(MElement other);
public abstract MElement AddTo(MElement other);
public override MElement AddTo(MElement other) => other switch {