public class DefaultMatrixSolver extends DefaultMatrix implements MatrixSolver
columnCount, data, rowCount
dataMax, TOLERANCE
コンストラクタと説明 |
---|
DefaultMatrixSolver(int size)
正方行列を構築する
|
修飾子とタイプ | メソッドと説明 |
---|---|
MatrixSolver |
extruct(int size,
int[] rows,
int[] columns)
指定した行・列を取り出した行列を返す
|
Matrix |
extructRowColumn(int size,
int[] rows,
int[] columns)
指定した行・列を取り出した行列を返す
|
Matrix |
getILU(double tolerance)
不完全 LU 分解をする
|
Matrix |
getLU(double tolerance)
LU 分解をする
|
MatrixSolver |
inverse()
逆行列を求める
|
static MatrixSolver |
inverse(DefaultMatrix lu,
double tolerance)
LU 分解法で逆行列を求める
|
DefaultMatrixSolver |
inverseNoPreserv(double tolerance)
逆行列を求める
元の行列は保持しない |
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 |
solveByGaussJordanNoPreserv(Vector p,
double tolerance)
Gauss - Jordan 法で連立方程式の解を求める
|
Vector |
solveByGaussNoPreserv(Vector p,
double tolerance)
ガウス消去法で連立方程式の解を求める
元の行列は保持しない |
Vector |
solveByILUCG(DefaultMatrix lu,
Vector p,
double tolerance,
int iterMax)
不完全 LU 分解共役勾配法で連立方程式の解を求める
|
Vector |
solveByILUCG(Vector p,
double tolerance)
不完全 LU 分解共役勾配法で連立方程式の解を求める
|
Vector |
solveByILUCG(Vector p,
double tolerance,
int iterMax)
不完全 LU 分解共役勾配法で連立方程式の解を求める
|
static Vector |
solveByLU(DefaultMatrix lu,
Vector p,
double tolerance)
LU 分解法で連立方程式の解を求める
|
Vector |
solveByLU(Vector p,
double tolerance)
LU 分解法で連立方程式の解を求める
|
Vector |
solveByLUNoPreserv(Vector p,
double tolerance)
軸選択 LU 分解法で連立方程式の解を求める
元の行列は保持しない |
Vector |
solveBySOR(Vector p,
double tolerance,
int iterMax,
double relax)
SOR 法で連立方程式の解を求める
|
void |
toLU(double tolerance)
この行列を LU 分解する
|
add, add, clone, columnCount, eigenvalue, eliminateRowColumn, get, init, isSymmetry, mul, mul, rowCount, set, transposition, unitMatrix
checkRange, determinant, equals, getColumnVector, getColumnVectors, getRowVector, getRowVectors, hashCode, toString, toStrings, trace
add, add, clone, columnCount, determinant, eliminateRowColumn, get, getColumnVector, getColumnVectors, getRowVector, getRowVectors, init, isSymmetry, mul, rowCount, set, toStrings, trace, transposition
public Matrix extructRowColumn(int size, int[] rows, int[] columns)
extructRowColumn
インタフェース内 Matrix
extructRowColumn
クラス内 DefaultMatrix
size
- 正方行列の大きさrows
- 行のインデックスを格納した配列columns
- 列のインデックスを格納した配列public MatrixSolver extruct(int size, int[] rows, int[] columns)
extruct
インタフェース内 MatrixSolver
size
- 正方行列の大きさrows
- 行のインデックスを格納した配列columns
- 列のインデックスを格納した配列public Vector solve(Vector p, MatrixSolveMethod method) throws MatrixSolveException
solve
インタフェース内 MatrixSolver
p
- ベクトル pmethod
- 行列解法MatrixSolveException
- 連立方程式の解が求まらないときpublic Vector solveByGauss(Vector p, double tolerance) throws MatrixSolveException
solveByGauss
インタフェース内 MatrixSolver
p
- ベクトル ptolerance
- 閾値MatrixSolveException
- 連立方程式の解が求まらないときpublic Vector solveByGaussNoPreserv(Vector p, double tolerance) throws MatrixSolveException
p
- ベクトル ptolerance
- 閾値MatrixSolveException
- 連立方程式の解が求まらないときpublic Vector solveByGaussJordan(Vector p, double tolerance) throws MatrixSolveException
solveByGaussJordan
インタフェース内 MatrixSolver
p
- ベクトル ptolerance
- 閾値MatrixSolveException
- 連立方程式の解が求まらないときpublic Vector solveByGaussJordanNoPreserv(Vector p, double tolerance) throws MatrixSolveException
p
- ベクトル ptolerance
- 閾値MatrixSolveException
- 連立方程式の解が求まらないときpublic Matrix getLU(double tolerance) throws MatrixSolveException
getLU
インタフェース内 MatrixSolver
tolerance
- 閾値MatrixSolveException
- LU 分解ができないときpublic void toLU(double tolerance) throws MatrixSolveException
tolerance
- 閾値MatrixSolveException
- LU 分解ができないときpublic static Vector solveByLU(DefaultMatrix lu, Vector p, double tolerance) throws MatrixSolveException
lu
- LU 分解された行列p
- ベクトル ptolerance
- 閾値MatrixSolveException
- 連立方程式の解が求まらないときpublic Vector solveByLU(Vector p, double tolerance) throws MatrixSolveException
solveByLU
インタフェース内 MatrixSolver
p
- ベクトル ptolerance
- 閾値MatrixSolveException
- 連立方程式の解が求まらないときpublic Vector solveByLUNoPreserv(Vector p, double tolerance) throws MatrixSolveException
p
- ベクトル ptolerance
- 閾値MatrixSolveException
- 連立方程式の解が求まらないときpublic Vector solveBySOR(Vector p, double tolerance, int iterMax, double relax) throws MatrixSolveException
solveBySOR
インタフェース内 MatrixSolver
p
- ベクトル ptolerance
- 閾値iterMax
- 反復回数の上限relax
- 緩和係数MatrixSolveException
- 連立方程式の解が求まらないときpublic Vector solveByCG(Vector p, double tolerance) throws MatrixSolveException
solveByCG
インタフェース内 MatrixSolver
p
- ベクトル ptolerance
- 閾値MatrixSolveException
- 連立方程式の解が求まらないときpublic Vector solveByCG(Vector p, double tolerance, int iterMax) throws MatrixSolveException
solveByCG
インタフェース内 MatrixSolver
p
- ベクトル ptolerance
- 閾値iterMax
- 反復回数の上限MatrixSolveException
- 連立方程式の解が求まらないときpublic Vector solveByILUCG(Vector p, double tolerance) throws MatrixSolveException
solveByILUCG
インタフェース内 MatrixSolver
p
- ベクトル ptolerance
- 閾値MatrixSolveException
- 連立方程式の解が求まらないときpublic Vector solveByILUCG(Vector p, double tolerance, int iterMax) throws MatrixSolveException
solveByILUCG
インタフェース内 MatrixSolver
p
- ベクトル ptolerance
- 閾値iterMax
- 反復回数の上限MatrixSolveException
- 連立方程式の解が求まらないときpublic Vector solveByILUCG(DefaultMatrix lu, Vector p, double tolerance, int iterMax) throws MatrixSolveException
lu
- 不完全 LU 分解された行列p
- ベクトル ptolerance
- 閾値iterMax
- 反復回数の上限MatrixSolveException
- 連立方程式の解が求まらないときpublic Matrix getILU(double tolerance) throws MatrixSolveException
tolerance
- 閾値MatrixSolveException
- 不完全 LU 分解ができないときpublic MatrixSolver inverse() throws MatrixSolveException
inverse
インタフェース内 MatrixSolver
MatrixSolveException
- 逆行列が求まらないときpublic static MatrixSolver inverse(DefaultMatrix lu, double tolerance) throws MatrixSolveException
lu
- LU 分解された行列tolerance
- 閾値MatrixSolveException
- 逆行列が求まらないときpublic DefaultMatrixSolver inverseNoPreserv(double tolerance) throws MatrixSolveException
tolerance
- 閾値MatrixSolveException
- 逆行列が求まらないとき