Hello All,

I coded a program that calculates the eigenvalues and eigenvectors of a real symmetric matrix by the Jacobi Transformation method.
I don?t have the source code with me now (at university) but if someone has interests I can post it here.

Regards,

APR 29
wolfao.
Posted on 2002-04-29 12:15:11 by wolfao
Post.
Posted on 2002-04-29 12:47:19 by The Svin
Ohhh Ya!

Would definitly be interested in such a gem :)
Posted on 2002-04-29 12:53:02 by NaN
The routine name is AUTOVS, an acronymm to Autov...s
(Eigen...v). It's in a DLL called Matrix. You won't have
problems to use it, but the comments in the source code is
in portuguese. I'm sorry, I don't have time to translate it
(maybe later).

There is another routine in the Matrix DLL: AUTOVALS that is
the same that AUTOVS but with the diference that this last
don't calculate autovectors.

The method utilizated is the Jacobi Tranformation. Basically you
transform (multiply twice) the A matrix by a similiraty transformation
that, at each iteration, zeroes (can I say this?) the off-diagonal
terms. You can be found more about this method in (Two very good
books):

KHAFAJI & TOOLEY (1986). Numerical Methods in Eng. Practice.
Holt, Rinehart and winston, inc. New York, USA, 642p
SCHWARZ, H.R. et. al. (1973). Numerical Analysis of Symmetric
Matrices. Prentice-Hall. New Jersey, USA, 276p




################################### USAGE:

AUTOVALS proc uses ebx pA:DWORD, \
pv:DWORD, \
nMaxIt:DWORD, \
pErrTol:DWORD

AUTOVS proc uses ebx pA:DWORD, \
pv:DWORD, \
pQ:DWORD, \
nMaxIt:DWORD, \
pErrTol:DWORD

INPUT:
pA: Symmetric matrix A (pointer)
nMaxIt: Max number of iterations (Jacobi Rotation will always
converge with less than 10 iterations. Please,
tell me if you now one symmetrical matrix that
needs more than 8 iterations.

OUTPUT:
pv: Vector that will contain eigenvalues (autovalores)

(pointer)
pQ: Transformation matrix = matrix with eigenvectors
(each column of Q correspond to one eigenvalue in
the order that it is listed) (pointer)
pErrTol: Tolerance to the off-diagonals terms be accepted
zero (poiter)


'########################### ASSEMBLY SAMPLE:

.data

A QWORD 30.0,6.0,5.0,6.0,20.0,9.0,5.0,9.0,30.0
v QWORD 0.0,0.0,0.0
Q QWORD 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
errTol QWORD 1e-200

.code

invoke AUTOVS, ADDR A, ADDR v, ADDR Q, 10, ADDR errTol

############################# FORTRAN SAMPLE:

call AUTOVS(A,v,Q,nMaxIt,errTol)

!If you need to know how to call DLL's routine with Fortran, I
can send the complete code.

######################## VISUAL BASIC SAMPLE:

Call AUTOVS(VarPtr(A(1, 1)), VarPtr(v(1)), VarPtr(Q(1,1), _
nMaxIt, VarPtr(errTol))

'Use VarPtr to get pointers with VB. (Very useful undocumented
function)





That's this. I hope it will be useful for someone. Ask me if you have any doubts. I'll post an Excel Sheet with code to calculate some eigenvs.

Best Regards.
Posted on 2002-04-29 17:48:25 by wolfao
Oi Wolfao

finalmente algu?m aqui pode me entender....:)

Estou dando uma olhada no arquivo que vc mandou....

? sempre bom ter conhecidos por aqui.


Abra?o


Beyond2000!
Posted on 2002-05-02 17:43:48 by Beyond2000!
Cool!

About the Eigenvs code. I'm creating more Asm routines related with matrix operations. Some of them: Similarity tranformations, fast multiplications, additions, scalar products and other Tensor operations like diadic, etc. I'll post it when I have finished.

See u.

BSB-06/05/02 at 20:22
Posted on 2002-05-06 18:16:55 by wolfao
I speak Pig Latin.

Ellohay owhay aregay ouyay odaytay.
Posted on 2002-05-06 18:25:57 by iblis
Iblis

it's not latin...it's portuguese

About the contents of the "phrase"...well not coments at all.
Posted on 2002-05-07 16:59:58 by Beyond2000!