figure.matrix
インタフェース MatrixSolver

すべてのスーパーインタフェース:
java.lang.Cloneable, Matrix
既知の実装クラスの一覧:
DefaultMatrixSolver, SparseMatrixSolver

public interface MatrixSolver
extends Matrix

連立方程式の解を求めるための行列インターフェイス
p = A xx を求める


メソッドの概要
 MatrixSolver extruct(int size, int[] rows, int[] columns)
          指定した行・列を取り出した行列を返す
 Matrix getLU(double tolerance)
          LU 分解をする
 MatrixSolver inverse()
          逆行列を求める
 Vector solve(Vector p, MatrixSolveMethod method)
          連立方程式の解を求める
 Vector solveByCG(Vector p, double tolerance)
          共役勾配法で連立方程式の解を求める
 Vector solveByCG(Vector p, double tolerance, int iterMax)
          共役勾配法で連立方程式の解を求める
 Vector solveByGauss(Vector p, double tolerance)
          ガウス消去法で連立方程式の解を求める
 Vector solveByGaussJordan(Vector p, double tolerance)
          Gauss - Jordan 法で連立方程式の解を求める
 Vector solveByILUCG(Vector p, double tolerance)
          不完全 LU 分解共役勾配法で連立方程式の解を求める
 Vector solveByILUCG(Vector p, double tolerance, int iterMax)
          不完全 LU 分解共役勾配法で連立方程式の解を求める
 Vector solveByLU(Vector p, double tolerance)
          LU 分解法で連立方程式の解を求める
 Vector solveBySOR(Vector p, double tolerance, int iterMax, double relax)
          SOR 法で連立方程式の解を求める
 
インタフェース figure.Matrix から継承されたメソッド
add, add, clone, columnCount, determinant, eliminateRowColumn, extructRowColumn, get, getColumnVector, getColumnVectors, getRowVector, getRowVectors, init, isSymmetry, mul, rowCount, set, toStrings, trace, transposition
 

メソッドの詳細

extruct

MatrixSolver extruct(int size,
                     int[] rows,
                     int[] columns)
指定した行・列を取り出した行列を返す

パラメータ:
size - 正方行列の大きさ
rows - 行のインデックスを格納した配列
columns - 列のインデックスを格納した配列
戻り値:
この行列から指定された行・列を取り出した行列

solve

Vector solve(Vector p,
             MatrixSolveMethod method)
             throws MatrixSolveException
連立方程式の解を求める

パラメータ:
p - ベクトル p
method - 行列解法
戻り値:
連立方程式の解を表すベクトル
例外:
MatrixSolveException - 連立方程式の解が求まらないとき

solveByGauss

Vector solveByGauss(Vector p,
                    double tolerance)
                    throws MatrixSolveException
ガウス消去法で連立方程式の解を求める

パラメータ:
p - ベクトル p
tolerance - 閾値
戻り値:
連立方程式の解を表すベクトル
例外:
MatrixSolveException - 連立方程式の解が求まらないとき

solveByGaussJordan

Vector solveByGaussJordan(Vector p,
                          double tolerance)
                          throws MatrixSolveException
Gauss - Jordan 法で連立方程式の解を求める

パラメータ:
p - ベクトル p
tolerance - 閾値
戻り値:
連立方程式の解を表すベクトル
例外:
MatrixSolveException - 連立方程式の解が求まらないとき

getLU

Matrix getLU(double tolerance)
             throws MatrixSolveException
LU 分解をする

パラメータ:
tolerance - 閾値
戻り値:
この行列を LU 分解した行列
例外:
MatrixSolveException - LU 分解ができないとき

solveByLU

Vector solveByLU(Vector p,
                 double tolerance)
                 throws MatrixSolveException
LU 分解法で連立方程式の解を求める

パラメータ:
p - ベクトル p
tolerance - 閾値
戻り値:
連立方程式の解を表すベクトル
例外:
MatrixSolveException - 連立方程式の解が求まらないとき

solveBySOR

Vector solveBySOR(Vector p,
                  double tolerance,
                  int iterMax,
                  double relax)
                  throws MatrixSolveException
SOR 法で連立方程式の解を求める

パラメータ:
p - ベクトル p
tolerance - 閾値
iterMax - 反復回数の上限
relax - 緩和係数
戻り値:
連立方程式の解を表すベクトル
例外:
MatrixSolveException - 連立方程式の解が求まらないとき

solveByCG

Vector solveByCG(Vector p,
                 double tolerance)
                 throws MatrixSolveException
共役勾配法で連立方程式の解を求める

パラメータ:
p - ベクトル p
tolerance - 閾値
戻り値:
連立方程式の解を表すベクトル
例外:
MatrixSolveException - 連立方程式の解が求まらないとき

solveByCG

Vector solveByCG(Vector p,
                 double tolerance,
                 int iterMax)
                 throws MatrixSolveException
共役勾配法で連立方程式の解を求める

パラメータ:
p - ベクトル p
tolerance - 閾値
iterMax - 反復回数の上限
戻り値:
連立方程式の解を表すベクトル
例外:
MatrixSolveException - 連立方程式の解が求まらないとき

solveByILUCG

Vector solveByILUCG(Vector p,
                    double tolerance)
                    throws MatrixSolveException
不完全 LU 分解共役勾配法で連立方程式の解を求める

パラメータ:
p - ベクトル p
tolerance - 閾値
戻り値:
連立方程式の解を表すベクトル
例外:
MatrixSolveException - 連立方程式の解が求まらないとき

solveByILUCG

Vector solveByILUCG(Vector p,
                    double tolerance,
                    int iterMax)
                    throws MatrixSolveException
不完全 LU 分解共役勾配法で連立方程式の解を求める

パラメータ:
p - ベクトル p
tolerance - 閾値
iterMax - 反復回数の上限
戻り値:
連立方程式の解を表すベクトル
例外:
MatrixSolveException - 連立方程式の解が求まらないとき

inverse

MatrixSolver inverse()
                     throws MatrixSolveException
逆行列を求める

戻り値:
この行列の逆行列
例外:
MatrixSolveException - 逆行列が求まらないとき