Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

matrix inversion 1

Status
Not open for further replies.

kurapati77

Programmer
Mar 23, 2004
2
0
0
DE
Hallo
Can anyone help me how to implement matrix inversion in C++ for MSVC++.
I have a very big size matrix to invert but its symmetric and only real values.
Is there any existing C++ routines which I can use for MSVC++ compiler
thanks in advance
bye
 
You could possibly find one somewhere if you search google, but I don't know of any. Try writing a matrix class and using a STL vector of vector of doubles to do it. I wrote a similar class (with an invert method) for a 4x4 matrix for a ray tracing project and it's not terribly difficult. Just use Gaussian elimination (make sure you have a pivot entry, swap rows if necessary) and build up the inverse by performing the same row operations to the identity matrix as you perform them to your current matrix. When the starting matrix is the identity matrix, what started as the identity matrix is now the inverse of the matrix you wanted.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top