org.mklab.nfc.leq
クラス DoubleRealLUDecomposer

java.lang.Object
  上位を拡張 org.mklab.nfc.leq.DoubleRealLUDecomposer

public final class DoubleRealLUDecomposer
extends Object

倍精度(double)型の実行列のLU分解(P*A=L*U)を求めるためのクラスです。 Numerical Recipes in C 2.3節 参照

バージョン:
$Revision: 1.4 $
作成者:
koga

コンストラクタの概要
DoubleRealLUDecomposer()
           
 
メソッドの概要
 LUDecompositionDoubleRealElements decompose(double[][] matrix, double tolerance)
          実行列をLU分解します。
 LUDecompositionDoubleRealElements decomposeWithPermutation(double[][] matrix, double tolerance)
          実行列を並べ替え付きLU分解します。
 double getDeterminant(double[][] matrix, double tolerance)
          行列式を返します。
 double[][] inverse(double[][] matrix, double tolerance)
          行列の逆行列を返します。
 double[][] leftDivide(double[][] a, double[][] b, double tolerance)
          線形方程式の解を返します。
 double[] solveLinearEquation(double[][] a, double[] b, double tolerance)
          線形方程式の解を返します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

DoubleRealLUDecomposer

public DoubleRealLUDecomposer()
メソッドの詳細

decompose

public LUDecompositionDoubleRealElements decompose(double[][] matrix,
                                                   double tolerance)
実行列をLU分解します。

元の行列をA、下三角行列を行置換した行列をL、上三角行列をU とすると、これらの行列の間には、

A = Q * H * Q T
Q T * Q = I
の関係が成り立ちます。

パラメータ:
matrix - 対象となる行列
tolerance - 許容誤差
戻り値:
LとU

decomposeWithPermutation

public LUDecompositionDoubleRealElements decomposeWithPermutation(double[][] matrix,
                                                                  double tolerance)
実行列を並べ替え付きLU分解します。

元の実行列をA、下三角行列を行置換した行列をL、上三角行列をU、 置換行列をPとすると、これらの行列の間には、

P * A = Q * H * Q T
Q T * Q = I
の関係が成り立ちます。

パラメータ:
matrix - 対象となる行列
tolerance - 許容誤差
戻り値:
LとUとP

solveLinearEquation

public double[] solveLinearEquation(double[][] a,
                                    double[] b,
                                    double tolerance)
線形方程式の解を返します。

線型方程式

a * x = b
の解xを返します。

パラメータ:
a - 行列
b - ベクトル
tolerance - 許容誤差
戻り値:
x

inverse

public double[][] inverse(double[][] matrix,
                          double tolerance)
行列の逆行列を返します。

パラメータ:
matrix - 対象となる行列
tolerance - 許容誤差
戻り値:
逆行列

leftDivide

public double[][] leftDivide(double[][] a,
                             double[][] b,
                             double tolerance)
線形方程式の解を返します。

線形方程式

A * x = B
の解xを返します。

パラメータ:
a - 行列
b - 行列
tolerance - 許容誤差
戻り値:
線形方程式の解

getDeterminant

public double getDeterminant(double[][] matrix,
                             double tolerance)
行列式を返します。

パラメータ:
matrix - 対象となる行列
tolerance - 許容誤差
戻り値:
行列式