1 #ifndef SEEN_NR_MATRIX_FNS_H
2 #define SEEN_NR_MATRIX_FNS_H
4 #include "nr-matrix.h"
6 namespace NR {
8 /** Given a matrix m such that unit_circle = m*x, this returns the
9 * quadratic form x*A*x = 1. */
10 Matrix elliptic_quadratic_form(Matrix const &m);
12 /** Given a matrix (ignoring the translation) this returns the eigen
13 * values and vectors. */
14 class Eigen{
15 public:
16 Point vectors[2];
17 Point values;
18 Eigen(Matrix const &m);
19 };
21 // Matrix factories
22 Matrix from_basis(const Point x_basis, const Point y_basis, const Point offset=Point(0,0));
24 Matrix identity();
26 double expansion(Matrix const &m);
28 bool transform_equalp(Matrix const &m0, Matrix const &m1, NR::Coord const epsilon);
29 bool translate_equalp(Matrix const &m0, Matrix const &m1, NR::Coord const epsilon);
30 bool matrix_equalp(Matrix const &m0, Matrix const &m1, NR::Coord const epsilon);
32 Matrix transform(Matrix const &m);
33 translate get_translation(Matrix const &m);
35 void matrix_print(const gchar *say, Matrix const &m);
37 } // namespace NR
39 #endif /* !SEEN_NR_MATRIX_FNS_H */
41 /*
42 Local Variables:
43 mode:c++
44 c-file-style:"stroustrup"
45 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
46 indent-tabs-mode:nil
47 fill-column:99
48 End:
49 */
50 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :