Logo Search packages:      
Sourcecode: inkscape version File versions

Matrix NR::elliptic_quadratic_form ( Matrix const &  m  ) 

Given a matrix m such that unit_circle = m*x, this returns the quadratic form x*A*x = 1.

Definition at line 6 of file nr-matrix-fns.cpp.

                                                {
    double const od = m[0] * m[1]  +  m[2] * m[3];
    return Matrix((m[0]*m[0] + m[1]*m[1]), od,
                  od, (m[2]*m[2] + m[3]*m[3]),
                  0, 0);
/* def quadratic_form((a, b), (c, d)):
   return ((a*a + c*c), a*c+b*d),(a*c+b*d, (b*b + d*d)) */
}


Generated by  Doxygen 1.6.0   Back to index