Re: [ojAlgo-user] Eigenvectors of Complex Hermitian Matrix
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Anders P. <an...@op...> - 2013-11-26 06:04:37
|
final Eigenvalue<ComplexNumber> tmpEvD = EigenvalueDecomposition.makeComplex(true); tmpEvD.compute(tmpA); final MatrixStore<ComplexNumber> tmpV = tmpEvD.getV(); http://ojalgo.org/generated/org/ojalgo/matrix/decomposition/Eigenvalue.html According to the docs you cannot trust that the eigenvalues are ordered (descending) when you extract the matrices, but the matrices D and V do of course match. /Anders On 26 nov 2013, at 05:06, Kieran Bjergstrom <kn...@ch...> wrote: > Dear All, > > I'm am attempting to use ojAlgo to find the eigendecomposition of > complex hermitian matrices with corresponding eigenvectors; acquiring > the eigenvalues has been trivial, however I am unsure as to how to find > the eigenvectors. > > From what I can see EigenvalueDecomposition has methods getD and getV, > which I expect would provide the eigenvalues with and corresponding > eigenvectors, however this requires explicitly instantiating > EigenvalueDecomposition - something which I don't understand how to do. > > As it stands, I have the following test code: > > ----- > //saves a bit of space > static ComplexNumber c(double a, double b){ > ComplexNumber z = new ComplexNumber(a,b); > return z; > } > > public static void main(String[] args) { > final ComplexNumber[][] tmpData = {{c(1),c(1,-1)},{c(1,1),c(-1)}}; > ComplexMatrix tmpA = tmpFactory.rows(tmpData); > List<ComplexNumber> s = tmpA.getEigenvalues(); > } > > ----- > > Which finds the Eigenvalues. How would one proceed to find the > eigenvectors for the ComplexMatrix tmpA, and are these eigenvectors, in > general, ordered to correlate with the eigenvalues? If possible I would > appreciate a concrete piece of code, as I haven't been able to gleam > further understanding from the javadocs. > > Thanks, > Kieran > > ------------------------------------------------------------------------------ > Shape the Mobile Experience: Free Subscription > Software experts and developers: Be at the forefront of tech innovation. > Intel(R) Software Adrenaline delivers strategic insight and game-changing > conversations that shape the rapidly evolving mobile landscape. Sign up now. > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > |