/// <summary>
        /// Returns the inverse of this lower triangular matrix
        /// </summary>
        /// <returns></returns>
        public new LowerTriangularMatrix Inverse()
        {
            LowerTriangularMatrix L = new LowerTriangularMatrix(rows, cols);

            L.SetToInverse(this);
            return(L);
        }
        /// <summary>
        /// Sets this positive-definite matrix to inverse of a given positive-definite matrix
        /// where a lower triangular workspace is passed.
        /// </summary>
        /// <param name="A">A symmetric positive-definite matrix, same size as <c>this</c>.  Can be the same object as <c>this</c>.</param>
        /// <param name="L">A workspace, same size as <paramref name="A"/>.</param>
        /// <returns><c>this</c></returns>
        /// <exception cref="PositiveDefiniteMatrixException">If <paramref name="A"/> is not positive definite.</exception>
        public PositiveDefiniteMatrix SetToInverse(PositiveDefiniteMatrix A, LowerTriangularMatrix L)
        {
            CheckCompatible(L, nameof(L));
            // Algorithm:
            // A = L*L'
            // inv(A) = inv(L')*inv(L)
            bool isPD = L.SetToCholesky(A);

            if (!isPD)
            {
                throw new PositiveDefiniteMatrixException();
            }
            L.SetToInverse(L);
            SetToOuterTranspose(L);
            return(this);
        }