forum.alglib.net
http://forum.alglib.net/

ALGLIB, Need an help in sorting eigenvalues
http://forum.alglib.net/viewtopic.php?f=2&t=2104
Page 1 of 1

Author:  waqar123 [ Fri Aug 08, 2014 10:37 am ]
Post subject:  ALGLIB, Need an help in sorting eigenvalues

Quote:
I am using ALGLIB for calculating eigenvalues and CSML for converting double[,] var into matrix.

Code:
double[,] dataset = new VarianceAndCovariance().buildMatrix();
double[,] var = new VarianceAndCovariance().eigenvalues(dataset);
Matrix matrix = new Matrix(var);
double [] var1 = new double[1];
double [,] var2 = new double[68,2];

alglib.smatrixevd(var, 68, 1, true,out var1,out var2); 

Quote:
Now this statement is returning eigenvalues(i.e. var1) in ascending order, but i want it to return in default sorting of matrix or normal mode not in ascending or descending order. How can i get eigenvalues without any sorting.
alglib.smatrixevd() function returns eigenvalues in ascending order, i want it according to the input matrix or in other words i dont want it to be sorted.
Kindly Help me i need it for my project

Author:  Sergey.Bochkanov [ Mon Aug 11, 2014 11:03 am ]
Post subject:  Re: ALGLIB, Need an help in sorting eigenvalues

Hello!

There is no such thing as "default order of eigenvalues". They are not ordered. You may rearrange then in any order, and in any case it will be eigendecomposition, i.e. one which represents matrix as A=Q*diag*Q^T. Eigensolver returns values in some order which is implementation-defined, but this order has no special meaning.

That's why values are always sorted - it is easier to work with sorted values than with unsorted ones.

Author:  Kazuya07 [ Fri Feb 27, 2015 10:49 am ]
Post subject:  Re: ALGLIB, Need an help in sorting eigenvalues

I posted today on google android market an app that uses most of the features available on ALGLIB (compatible with the resources available on a tablet or a smartphone). The app is called STATX and the full version is a fee (? 2). For ALGLIB Forum members is free: just send me an email and I will reply attaching the apk file (by opening the attachment with your tablet or smartphone you'll be prompted for the installation).

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/