[Insight-developers] vnl_svd on Borland compiler

Miller, James V (Research) millerjv@crd.ge.com
Wed, 2 Oct 2002 09:24:30 -0400


While that indeed seems to be a problem.  Why are using an 
SVD to compute a determinant? vnl_determinant<> will switch
between using a brute force determinant and qr decomposition.

Does vnl_determinant produce the correct answer?


> -----Original Message-----
> From: Aljaz Noe [mailto:noe@grasp.cis.upenn.edu]
> Sent: Tuesday, October 01, 2002 6:58 PM
> To: Insight-Developers
> Subject: [Insight-developers] vnl_svd on Borland compiler
> 
> 
> Hi!
> 
> Consider the following piece of code to compute the determinant of a
> matrix:
> 
>   vnl_matrix<double> m(2,2,0.0);
>   m[0][0]=2.0; m[1][0]=1.0;
>   m[0][1]=1.0; m[1][1]=2.0;
>   double det=vnl_svd<double>(m).determinant_magnitude();
>   cout<<det<<"\n";
> 
> The result should be det=3. But if the same code is compiled 
> on Borland
> bcc32 compiler the result is det=2. Comments???
> 
> This also seems to be the reason why many of the FEM tests fail on
> Borland compiler.
> 
> Aljaz
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers
>