is_sym_pos_def: Check if a matrix is symmetric positive-definite

Description Usage Arguments Value Examples

Description

Checks a matrix to determine if it is symmetric positive-definite.

Usage

1

Arguments

x

matrix: numeric matrix which should be checked to see if it is symmetric positive-definite.

Value

logical: TRUE if the supplied matrix is symmetric positive-definite, FALSE otherwise.

Examples

1
2
is_sym_pos_def(matrix(c(2.51, 2.01, 2.01, 1.74), 2, 2))  # => TRUE
is_sym_pos_def(matrix(c(1, 1, 1, 1), 2, 2))              # => FALSE

toniprice/jutebag documentation built on May 12, 2019, 4:39 a.m.