Hi,<div><br></div><div>After trying out GSLL, Clem, also FemLisp, Lisplab managed to get me</div><div>the functionality I needed with the least trouble.</div><div><br></div><div>I'm trying to get the connectivity of a graph (second smallest eigen value) from eigenvalues.</div>
<div><br></div><div>Given the fully connected 4x4 adjacency matrix:</div><div><br></div><div><div>#md(( 0.000 1.000 1.000 1.000 )</div><div> ( 1.000 0.000 1.000 1.000 )</div><div> ( 1.000 1.000 0.000 1.000 )</div>
<div> ( 1.000 1.000 1.000 0.000 ))</div></div><div><br></div><div>I compute the diagonal matrix of the vector sum of the adjacency matrix and then</div><div>subtract the adjacency matrix from it to get the laplacian matrix.</div>
<div><br></div><div>I'm unable to call (lisplab:eigenvalues) on that matrix, despite being a #md matrix.</div><div>I can see that the function calls for LISPLAB::MATRIX-FOREIGN-DGE. However other functions</div><div>
that call for the same type seem to work when called with #md, namely FFT1.</div>
<div><br></div><div>As a workaround, I'm using this call to get the eigenvalues:</div><div><br></div><div>(lisplab::dgeev (laplacian-matrix *adj-matrix* *diag-matrix*) nil nil) and I get:</div><div><br></div><div><div>
(</div><div>#md(( 4.000 )</div><div> (-1.1102d-16)</div><div> ( 4.000 )</div><div> ( 4.000 ))</div><div> NIL NIL)</div></div><div><br></div><div>Is this appropriate?</div><div><br></div><div><div>I'm curious however about different results I get from Matlab.</div>
</div><div>I get the same results up until the call to </div><div><br></div><div>>> eig(diag(sum(A)) - A)</div><div><br></div><div>which gives me</div><div><br></div><div><div>ans =</div><div><br></div><div> 0.0000</div>
<div> 4.0000</div><div> 4.0000</div><div> 4.0000</div></div><div><br></div><div>Any comment I can get on this would be awsome. Am I going about this right?</div><div>What might I be missing? </div><div><br></div>
<div>Sorry about the lengthy email.</div><div><br></div><div>Thanks!</div><div>José Santos</div>