~ubuntu-branches/ubuntu/trusty/yade/trusty

« back to all changes in this revision

Viewing changes to py/mathWrap/miniEigen.cpp

  • Committer: Package Import Robot
  • Author(s): Anton Gladky, cf3f8d9
  • Date: 2013-10-30 20:56:33 UTC
  • mfrom: (20.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20131030205633-1f01r7hjce17d723
Tags: 1.05.0-2
[cf3f8d9] Pass -ftrack-macro-expansion=0 only if gcc>=4.8. (Closes: #726009)

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
#include<Eigen/SVD>
126
126
static bp::tuple Matrix3r_polarDecomposition(const Matrix3r& self){ Matrix3r unitary,positive; Matrix_computeUnitaryPositive(self,&unitary,&positive); return bp::make_tuple(unitary,positive); }
127
127
static bp::tuple Matrix3r_eigenDecomposition(const Matrix3r& self){ Matrix3r rot,diag; matrixEigenDecomposition(self,rot,diag); return bp::make_tuple(rot,Vector3r(diag.diagonal())); }
 
128
static bp::tuple Matrix3r_svd(const Matrix3r& self){ Matrix3r u,s,v; Matrix_SVD(self,&u,&s,&v); return bp::make_tuple(u,s,v); }
128
129
static bp::tuple Matrix6r_polarDecomposition(const Matrix6r& self){ Matrix6r unitary,positive; Matrix_computeUnitaryPositive(self,&unitary,&positive); return bp::make_tuple(unitary,positive); }
129
130
static bp::tuple Matrix6r_eigenDecomposition(const Matrix6r& self){ Matrix6r rot,diag; matrixEigenDecomposition(self,rot,diag); return bp::make_tuple(rot,Vector6r(diag.diagonal())); }
 
131
static bp::tuple Matrix6r_svd(const Matrix6r& self){ Matrix6r u,s,v; Matrix_SVD(self,&u,&s,&v); return bp::make_tuple(u,s,v); }
130
132
 
131
133
#undef IDX_CHECK
132
134
 
237
239
                .def("transpose",&Matrix3r_transpose)
238
240
                .def("polarDecomposition",&Matrix3r_polarDecomposition)
239
241
                .def("eigenDecomposition",&Matrix3r_eigenDecomposition)
 
242
                .def("svd",&Matrix3r_svd)
240
243
                .def("diagonal",&Matrix3r_diagonal)
241
244
                .def("row",&Matrix3r_row)
242
245
                .def("col",&Matrix3r_col)
275
278
                .def("col",&Matrix6r_col)
276
279
                .def("polarDecomposition",&Matrix6r_polarDecomposition)
277
280
                .def("eigenDecomposition",&Matrix6r_eigenDecomposition)
 
281
                .def("svd",&Matrix6r_svd)
278
282
                //
279
283
                .def("__neg__",&Matrix6r__neg__)
280
284
                .def("__add__",&Matrix6r__add__Matrix6r).def("__iadd__",&Matrix6r__iadd__Matrix6r)