0

When computing the eigenvalues with OjAlgo. Are the eigenvalues always on a descended order?

euraad
  • 2,467
  • 5
  • 30
  • 51

2 Answers2

3

It depends on the algorithm chosen for computing the eigenvalues. For instance, in the class RawEigenvalue.Symmetric, isOrdered() returns true. According to my limited understanding, this particular decomposition is used when the matrix is real, symmetric, and not too big (and possibly in other cases).

Boken
  • 4,825
  • 10
  • 32
  • 42
1

Right from the documentation for Eigenvalue#isOrdered:

The eigenvalues in D (and the eigenvectors in V) are not necessarily ordered. This is a property of the algorithm/implementation, not the data.

akuzminykh
  • 4,522
  • 4
  • 15
  • 36
  • So "This is a property of the algorithm" means that they are functionality that sort on descended order? I don't understand the answer. – euraad May 17 '20 at 10:50
  • 1
    @DanielMårtensson Your question is: *"Are the eigenvalues always on a descended order?"*, and the answer is: *"The eigenvalues [...] are not necessarily ordered"*. – akuzminykh May 17 '20 at 10:56
  • @DanielMårtensson There is one more thing: Check out [`Eigenvalue#getEigenvalues`](https://javadoc.scijava.org/ojAlgo/org/ojalgo/matrix/decomposition/Eigenvalue.html#getEigenvalues--): *"The values should be in the same order as the matrices "V" and "D", and if they are ordered or not is indicated by the isOrdered() method."* – akuzminykh May 17 '20 at 10:57
  • And it's a property of the algorithm/implementation...not the data. So if the algorithm is selected on a descended order...then the result must be on descended order as well? – euraad May 17 '20 at 11:07
  • @DanielMårtensson Sorry, I'm not to sure at this point myself. As you've noticed, the documentation is kinda ambiguous and I don't want to tell you wrong things. You should probably just try it out or wait for another answer. – akuzminykh May 17 '20 at 11:17
  • What does "if the algorithm is selected on a descended order" mean? The method isOrdered() will tell you if the eigenvalues are guaranteed to be ordered or not. – apete May 17 '20 at 12:48
  • @apete I was confused due to the word `property` in `This is a property of the algorithm/implementation`. It's like a random algorithm was implemented that sort on descended order if it wants. – euraad May 17 '20 at 20:17