Is there any existing library or repository library available to calculate inverse matrix, especially for large scale matrix?
Matrix inverse
Best answer by Marcel Hunting
Hi
Attached is a zip file that contains three folders:
- CalcInverse: small AIMMS project with an example to calculate the inverse.
- EigenLinearAlgebra: AIMMS library that calls an external procedure to calculate the inverse using Eigen. (It is used in the example project.)
- src: Visual Studio project with source code to calculate the inverse using Eigen. It retrieves the matrix from AIMMS and passes back the inverse matrix to AIMMS.
You have to build the DLL containing the external procedure yourself using Visual Studio. For that you need to download Eigen from here and then copy the Eigen sub-folder from the Eigen package to the src folder.
The external procedure prGetInverse in the AIMMS library has an argument ‘isPD’ which can be set to 1 to indicate that the matrix is positive definite. In that case a different method will be used which should be faster than the standard method.
The example loads the data for a 1,000x1,000 matrix by default. It also contains a case file for a 10,000x10,000 matrix.
Sign up
Already have an account? Login
Please use your business or academic e-mail address to register
Login to the community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.