Exemplo n.º 1
0
SCM dot_eigenvectors(SCM mo, integer b_start)
{
     evectmatrix *m = assert_evectmatrix_smob(mo);
     sqmatrix U, S;
     SCM obj;

     CHECK(mdata, "init-params must be called before dot-eigenvectors");

     U = create_sqmatrix(m->p);
     S = create_sqmatrix(m->p);
     evectmatrix_XtY_slice(U, *m, H, 0, b_start - 1, m->p, S);
     destroy_sqmatrix(S);
     obj = sqmatrix2scm(U);
     destroy_sqmatrix(U);
     return obj;
}
Exemplo n.º 2
0
/* compute U = adjoint(X) * Y, with S a scratch matrix. */
void evectmatrix_XtY(sqmatrix U, evectmatrix X, evectmatrix Y, sqmatrix S)
{
     CHECK(X.p == Y.p, "matrices not conformant");
     
     evectmatrix_XtY_slice(U, X, Y, 0, 0, X.p, S);
}