Library to solve matrix determinant c++

Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Dec 2008
Posts: 10
Reputation: 35nando is an unknown quantity at this point 
Solved Threads: 0
35nando 35nando is offline Offline
Newbie Poster

Library to solve matrix determinant c++

 
0
  #1
Dec 19th, 2008
Hi, i'm looking for some library that provides solving matrix determinant. My matrix contains complex numbers (complex.h).
Please write me some hints
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 1,672
Reputation: Lerner is a name known to all Lerner is a name known to all Lerner is a name known to all Lerner is a name known to all Lerner is a name known to all Lerner is a name known to all 
Solved Threads: 261
Lerner Lerner is offline Offline
Posting Virtuoso

Re: Library to solve matrix determinant c++

 
0
  #2
Dec 19th, 2008
Hint: google search using C++ matrix determinant. It provided 12,000 hits. One of them, probably early on in the list, probably/may have something to help.
Klatu Barada Nikto
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 320
Reputation: cikara21 is an unknown quantity at this point 
Solved Threads: 63
cikara21's Avatar
cikara21 cikara21 is offline Offline
Posting Whiz

Re: Library to solve matrix determinant c++

 
0
  #3
Dec 19th, 2008
see...Cramers rule...then u can create your own library...
.:-cikara21-:.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 2,001
Reputation: ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of 
Solved Threads: 343
ArkM's Avatar
ArkM ArkM is offline Offline
Postaholic

Re: Library to solve matrix determinant c++

 
0
  #4
Dec 19th, 2008
For example, download free Matrix TCL Lite 1.13 by Techsoft:
http://www.techsoftpl.com/matrix/download.htm
(it's not a recommendation, I never use this library but it's compact and simple ).
Comment 5 lines of abs definitions in downloaded matrix.h:
  1. /* Do that, you can't compile it with VC++ when <complex> included
  2. #if ( defined(__BORLANDC__) || _MSC_VER ) && !defined( __GNUG__ )
  3. inline float abs (float v) { return (float)fabs( v); }
  4. inline double abs (double v) { return fabs( v); }
  5. inline long double abs (long double v) { return fabsl( v); }
  6. #endif
  7. */
Now
  1. #include <complex>
  2. using namespace std;
  3. #include "matrix.h"
  4.  
  5. typedef complex<double> Complex;
  6. typedef math::matrix<Complex> CMat;
  7.  
  8. int main()
  9. {
  10. CMat m(2,2);
  11. m(0,0) = Complex(0,1);
  12. m(0,1) = m(1,0) = 0.0;
  13. m(1,1) = Complex(0,1);
  14.  
  15. cout << m.Det() << endl;
  16.  
  17. return 0;
  18. }
  19. // prints (-1,0)
Read package manual in pro_doc directory...
Last edited by ArkM; Dec 19th, 2008 at 1:43 pm.
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 10
Reputation: 35nando is an unknown quantity at this point 
Solved Threads: 0
35nando 35nando is offline Offline
Newbie Poster

Re: Library to solve matrix determinant c++

 
0
  #5
Jan 5th, 2009
Originally Posted by cikara21 View Post
see...Cramers rule...then u can create your own library...
Cramer's rule is useful to fing solution of a system of linear equations, not solving determinant.

Originally Posted by ArkM View Post
For example, download free Matrix TCL Lite 1.13 by Techsoft:
http://www.techsoftpl.com/matrix/download.htm ...
Thanks, that library is simple and solves determinants quickly
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC