This project has moved. For the latest updates, please go here.

System.Numerics legacy bug in eigenvalue decomposition?

May 25, 2011 at 11:30 PM

Hello, I've been using April 17 2011 (beta) release MathNet.Numerics to calculate the eigen decomposition of a 3x3 covariance matrix.  I can successfully get the eigenvectors returned, however eigenvalues throws an exception

"The type 'System.Numerics.Complex' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Numerics, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'"

Referencing the System.Numerics dll doesn't solve the problem either so I'm guessing the current compilation somehow is referencing a .Net 2.0 version of the library.  I guess another question is why the System.Numerics namespace is required at all...

Thanks in advance,

May 26, 2011 at 5:52 AM

Hi,

>"The type 'System.Numerics.Complex' is defined in an assembly that is not referenced. You must add a reference to
>assembly 'System.Numerics, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'"

Other folks have gotten this error if they inadvertently reference the Silverlight build of Math.NET Numerics instead of the .NET 4.0 build. Could you verify that you are referencing the correct Numerics build.

> I guess another question is why the System.Numerics namespace is required at all...

System.Numerics provides the Complex type we use. 

Regards,

Marcus

May 26, 2011 at 3:47 PM

Ah yes the silverlight version was being referenced.  That fixed the problem.

And sorry I wasn't familiar with System.Numerics, that makes sense now.  Thanks!  Keep up the great work.