/// <summary>Computes the inverse of this matrix.</summary> /// <returns>The inverse of this matrix.</returns> public virtual Matrix <T> Inverse() { if (RowCount != ColumnCount) { throw new ArgumentException(Resources.ArgumentMatrixSquare); } return(LU <T> .Create(this).Inverse()); }
/// <summary>Computes the determinant of this matrix.</summary> /// <returns>The determinant of this matrix.</returns> public virtual T Determinant() { if (RowCount != ColumnCount) { throw new ArgumentException(Resources.ArgumentMatrixSquare); } return(LU <T> .Create(this).Determinant); }
/// <summary> /// Compute the sparse LU factorization for given matrix. /// </summary> /// <param name="matrix">The matrix to factorize.</param> /// <param name="tol">Partial pivoting tolerance (form 0.0 to 1.0).</param> /// <returns></returns> public static LU SparseLU(this SparseMatrix matrix, double tol = 1.0) { return(LU.Create(matrix, ColumnOrdering.MinimumDegreeAtPlusA, tol)); }
/// <summary> /// Computes the LU decomposition for a matrix. /// </summary> /// <param name="matrix">The matrix to factor.</param> /// <returns>The LU decomposition object.</returns> public static LU LU(this Matrix <double> matrix) { return((LU)LU <double> .Create(matrix)); }
/// <summary> /// Computes the LU decomposition for a matrix. /// </summary> /// <param name="matrix">The matrix to factor.</param> /// <returns>The LU decomposition object.</returns> public static LU LU(this Matrix <Complex> matrix) { return((LU)LU <Complex> .Create(matrix)); }
/// <summary> /// Computes the LU decomposition for a matrix. /// </summary> /// <param name="matrix">The matrix to factor.</param> /// <returns>The LU decomposition object.</returns> public static LU LU(this Matrix <float> matrix) { return((LU)LU <float> .Create(matrix)); }