I just ported my code from MATLAB to Java, and I need the eigen decomposition of a matrix, specifically I only need the first k
values not the full decomposition.
However in JAMA, the eigen-decomposition class computes the full eigen decomposition. I tried to modify it, but it throws some errors. Is there another similar library?
In MATLAB, the function in question is eigs(k,A)
In the case you cannot find any existing codes, I guess you should refer to this thesis or maybe this paper.