h_is_positive_definite: Testing Matrix for Positive Definiteness

Description Usage Arguments Details Value

View source: R/helpers.R

Description

[Experimental]

This helper function checks whether a given numeric matrix x is positive-definite.

Usage

1
h_is_positive_definite(x, tolerance = 1e-08)

Arguments

x

(matrix)
a matrix to be checked.

tolerance

(number)
a given tolerance number used to check whether an eigenvalue is positive or not. An eigenvalue is considered as positive if and only if it is greater than the tolerance.

Details

The positive definiteness test implemented in this function is based on the following characterization valid for real matrices: A symmetric matrix is positive-definite if and only if all of its eigenvalues are positive. In this function an eigenvalue is considered as positive if and only if it is greater than the tolerance.

Value

TRUE if a given matrix is a positive-definite, FALSE otherwise.


0liver0815/onc-crmpack-test documentation built on Feb. 19, 2022, 12:25 a.m.