/// <summary> /// Pseudo Inverse /// </summary> public Matrix PseudoInverse() { double[][] tran = MatrixLowLevel.Transpose(m_Items); double[][] result = MatrixLowLevel.Multiply(MatrixLowLevel.Inverse(MatrixLowLevel.Multiply(tran, m_Items)), tran); return(new Matrix(result)); }
/// <summary> /// Matrix Division /// </summary> public static Matrix operator /(Matrix left, Matrix right) { if (null == left) { throw new ArgumentNullException(nameof(left)); } else if (null == right) { throw new ArgumentNullException(nameof(right)); } if (left.ColumnCount != right.LineCount) { throw new ArgumentException($"Right matrix must have {left.ColumnCount} liness, actual {right.LineCount}", nameof(right)); } else if (right.ColumnCount != right.LineCount) { throw new ArgumentException("Divisor must be a square matrix.", nameof(right)); } return(new Matrix(MatrixLowLevel.Multiply(left.m_Items, MatrixLowLevel.Inverse(right.m_Items)))); }