行列の計算を理解しようとしています。私の質問は単純に見えるかもしれませんが、RHSベクトルとは何かを簡単に説明できる答えが必要です。私はそれがApachecommons数学ライブラリで使用されているのをよく見ます。たとえば、これはstackoverflowページから取得しました。
public class LinearAlgebraDemo
{
public static void main(String[] args)
{
double [][] values = {{1, 1, 2}, {2, 4, -3}, {3, 6, -5}};
double [] rhs = { 9, 1, 0 }; /* RHS Vector */
RealMatrix a = new Array2DRowRealMatrix(values);
DecompositionSolver solver = new LUDecompositionImpl(a).getSolver();
RealVector b = new ArrayRealVector(rhs);
RealVector x = solver.solve(b);
RealVector residual = a.operate(x).subtract(b);
double rnorm = residual.getLInfNorm();
}
}
誰かが私にこのコード、特にRHSベクトルとその目的を説明できますか?どうもありがとうございます。