# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.algebra.linear.matrix.doubles.operation.positivedefinite

## Class PositiveDefiniteMatrixByPositiveDiagonal

• All Implemented Interfaces:
Matrix, MatrixAccess, MatrixRing, MatrixTable, Densifiable, AbelianGroup<Matrix>, Monoid<Matrix>, Ring<Matrix>, Table, DeepCopyable
Direct Known Subclasses:
PositiveSemiDefiniteMatrixNonNegativeDiagonal

public class PositiveDefiniteMatrixByPositiveDiagonal
extends DenseMatrix
This class "converts" a matrix into a symmetric, positive definite matrix, if it is not already so, by forcing the diagonal entries in the eigen decomposition to a small non-negative number, e.g., 0.
• "Jin Wang, Chunlei Liu. "Generating Multivariate Mixture of Normal Distributions using a Modified Cholesky Decomposition," Simulation Conference, 2006. WSC 06. Proceedings of the Winter. p. 342 - 347. 3-6 Dec. 2006."
• "Higham, Nicholas J., "Computing a Nearest Symmetric Positive Semidefinite Matrix," Linear Algebra and its Applications, 1988, 103:103-118"
• ### Constructor Summary

Constructors
Constructor and Description
PositiveDefiniteMatrixByPositiveDiagonal(Matrix A, double epsilon, double small)
Constructs a positive definite matrix by forcing the diagonal entries in the eigen decomposition to a small non-negative number, e.g., 0.

• ### Methods inherited from class com.numericalmethod.suanshu.algebra.linear.matrix.doubles.matrixtype.dense.DenseMatrix

add, deepCopy, equals, get, getColumn, getColumn, getRow, getRow, hashCode, minus, multiply, multiply, nCols, nRows, ONE, opposite, scaled, set, setColumn, setRow, t, toDense, toString, ZERO
• ### Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait
• ### Constructor Detail

• #### PositiveDefiniteMatrixByPositiveDiagonal

public PositiveDefiniteMatrixByPositiveDiagonal(Matrix A,
double epsilon,
double small)
Constructs a positive definite matrix by forcing the diagonal entries in the eigen decomposition to a small non-negative number, e.g., 0.
Parameters:
A - a matrix
epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0; used in the eigen decomposition (don't make it 0)
small - the minimum value of the new diagonal entries