4

Do you know of a good library/way that I can use to solve an eigen system in c#?

My data is 2D/3D and I want to get direction and length of first and second eigen vectors to evaluate how my data is elongated in 2D space.

Thanks

Mo Valipour
  • 13,286
  • 12
  • 61
  • 87

3 Answers3

5

Maybe this library can help you.

duffymo
  • 305,152
  • 44
  • 369
  • 561
5

Alglib is GPL2.

Alexandre C.
  • 55,948
  • 11
  • 128
  • 197
2

Thanks to guys who suggested Alglib but its naming convention is c++ style and I didn't find it easy to use!

Instead I found a brilliant opensource library called Accord.Math. It provides a fantastic API for mathematics which very well satisfies my needs.

I first found a Normalized EigenValue decomposition code here, but apparently it is already added to Accord.Math library.

My code looks like this:

var gevd = new EigenvalueDecomposition(rect);
var V = gevd.Eigenvectors;
var D = gevd.DiagonalMatrix;

It also provides other types of decompositions:

enter image description here

Mo Valipour
  • 13,286
  • 12
  • 61
  • 87