Resolve matrix differential equation with sparse matrix and ojAlgo

ぐ巨炮叔叔 提交于 2020-01-06 06:42:28

问题


I am developping a java evolution tool with ojAlgo, and I try to resolve the following equation :

where A is a sparse matrix (for now the dimension of the matrix is 2000 x 2000, it will be scaled later on), A is not symmetric and use only real values.

I made some researchs and I tried to find the way to resolve this equation (using SparseStore) on github wiki/javadoc but I didn't find a way to do it. Can you help me find methods/class I should use ? Thank you


回答1:


There is no direct/specific method to solve differential equations in ojAlgo. You have to know how to do it (using pen and paper) then ojAlgo can help you perform the calculations.

The main problem here is finding the eigenpairs, right?

    Eigenvalue<Double> evd = Eigenvalue.PRIMITIVE.make(matrix);

    evd.decompose(matrix);

    Array1D<ComplexNumber> values = evd.getEigenvalues();
    MatrixStore<ComplexNumber> vectors = evd.getEigenvectors();
    Eigenpair pair = evd.getEigenpair(0); // One of the pairs


来源:https://stackoverflow.com/questions/49527525/resolve-matrix-differential-equation-with-sparse-matrix-and-ojalgo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!