기본적으로 ComplexDoubleMatrix 클래스에 속하는 행렬의 역함수를 계산하지만 inverse() 또는 inv()와 같은 함수를 찾지 못했습니다. 어떤 몸이라도 행렬의 역함수를 계산하는 법을 알고 있습니까? 미리 감사드립니다.jblas를 사용하여 ComplexDoubleMatrix의 역함수를 얻는 방법
최종 목표는 jblas.eigen을 사용하여 행렬의 고유 분해를 만드는 것입니다. 현재 나의 현재 구현은 아래의 jama 라이브러리입니다. 비슷한 기능을 수행하려면 Vinverse를 계산해야합니다. 그래서 jblas에서 역함수를 찾고 싶습니다.
public static SimpleEigenDecomposition SimpleEigenDecomposition(double [][] rates)
{
Matrix ratesMatrix = new Matrix(rates);
EigenvalueDecomposition ed = new EigenvalueDecomposition(ratesMatrix);
Matrix V = ed.getV();
Matrix D =ed.getD();
Matrix Vinverse = V.inverse();
Matrix resultMatrix = V.times(D).times(V.inverse());
//check if result and rates are close enough
SimpleMatrix trueMatrix = new SimpleMatrix(rates);
SimpleMatrix calculatedMatrix = new SimpleMatrix(resultMatrix.getArray()) ;
if(EJMLUtils.isClose(trueMatrix, calculatedMatrix, THRESHOLD))
{
return new SimpleEigenDecomposition(V, D, Vinverse);
}else{
throw new RuntimeException();
}