is.spd: Check if a matrix is symmetric and positive definite

View source: R/is-spd.R

is.spdR Documentation

Check if a matrix is symmetric and positive definite

Description

Check if a matrix is symmetric and positive definite

Usage

is.spd(..., tol = 1e-08)

Arguments

...

One or more numeric matrices

tol

Numerical tolerance for checking symmetry and positive definiteness

Details

Function checks whether the matrix x is symmetric and positive definite. Symmetry is evaluated up to an entrywise tolerance of tol, so that differences smaller than tol are ignored. Positive-definiteness is checked by computing the eigenvalues of x using eigen, setting eigenvalues smaller than tol in absolute value to zero, and then checking whether any are less than or equal to zero.

Value

A Boolean value indicating whether the matrix is symmetric and positive definite


areshenk/spdm documentation built on Aug. 5, 2023, 12:26 a.m.