Package gov.nih.mipav.model.algorithms
Class ModifiedCholeskyFactorization
java.lang.Object
gov.nih.mipav.model.algorithms.ModifiedCholeskyFactorization
Copyright (c) 2015, Sheung Hun Cheng and Nicholas J. Higham
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
modified-cholesky contains MATLAB functions that
compute a modified Cholesky factorization of a symmetric and possibly
indefinite matrix. The algorithm is from
S. H. Cheng and N.J. Higham.
"[A modified Cholesky algorithm based on a symmetric indefinite
factorization](http://dx.doi.org/10.1137/S0895479896302898)".
SIAM J. Matrix Anal. Appl., 19(4):1097-1110, 1998.
and uses LDL^T factorization with a symmetric form of rook pivoting
proposed by Ashcraft, Grimes, and Lewis. The functions here are based on
code originally written by Bobby Cheng and Nick Higham in 1996.
Modified Cholesky algorithm based on LDL' factorization.
% [L D,P,D0,rho] = modchol_ldlt_m(A,delta) computes a modified
% Cholesky factorization P*(A + E)*P' = L*D*L', where
% P is a permutation matrix, L is unit lower triangular,
% and D is block diagonal and positive definite with 1-by-1 and 2-by-2
% diagonal blocks. Thus A+E is symmetric positive definite, but E is
% not explicitly computed. Also returned is a block diagonal D0 such
% that P*A*P' = L*D0*L'. If A is sufficiently positive definite then
% E = 0 and D = D0. Rho is the growth factor for the factorization.
% The algorithm sets the smallest eigenvalue of D to the tolerance
% delta, which defaults to sqrt(eps)*norm(A,'fro').
% The LDL' factorization is compute using a symmetric form of rook
% pivoting proposed by Ashcraft, Grimes and Lewis.
%
% This routine does not exploit symmetry and is not designed to be
% efficient.
% Authors: Bobby Cheng and Nick Higham, 1996; revised 2015.
Ported to Java by William Gandler from the file modchol_ldlt_m.m.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionModifiedCholeskyFactorization(double[][] Ain, double delta, double[][] L, double[][] DMC, double[][] P, double[][] D, double[] rho) -
Method Summary
-
Field Details
-
Ain
private double[][] Ain -
delta
private double delta -
L
private double[][] L -
DMC
private double[][] DMC -
P
private double[][] P -
D
private double[][] D -
rho
private double[] rho -
epsilon
private double epsilon
-
-
Constructor Details
-
ModifiedCholeskyFactorization
public ModifiedCholeskyFactorization() -
ModifiedCholeskyFactorization
public ModifiedCholeskyFactorization(double[][] Ain, double delta, double[][] L, double[][] DMC, double[][] P, double[][] D, double[] rho)
-
-
Method Details
-
test_modchol
public void test_modchol() -
run
public void run()
-