Macaulay2 » Documentation
Packages » GraphicalModelsMLE :: checkPSD
next | previous | forward | backward | up | index | toc

checkPSD -- returns positive semidefinite matrices from a list of symmetric matrices

Synopsis

Description

This function takes a list of symmetric matrices (or a single symmetric matrix) and returns the sublist of its positive semidefinite matrices.

Note that the function does not check whether the matrices in the original list are symmetric.

If there are no positive semidefinite matrices in the list, it returns an empty list.

i1 : L={matrix{{1,0},{0,1}},matrix{{-2,0},{0,1}},matrix{{sqrt(-1),0},{0,sqrt (-1)}},matrix{{0,0},{0,0}}}

o1 = {| 1 0 |, | -2 0 |, | ii 0  |, 0}
      | 0 1 |  | 0  1 |  | 0  ii |

o1 : List
i2 : checkPSD(L)

o2 = {| 1 0 |, 0}
      | 0 1 |

o2 : List

Ways to use checkPSD :

For the programmer

The object checkPSD is a method function with options.