5 #ifndef __pinocchio_python_spatial_symmetric3_hpp__ 
    6 #define __pinocchio_python_spatial_symmetric3_hpp__ 
   11 #include <boost/python/tuple.hpp> 
   25     template<
typename Symmetric3>
 
   27     : 
public boost::python::def_visitor<Symmetric3PythonVisitor<Symmetric3>>
 
   46       template<
class PyClass>
 
   49         static const Scalar dummy_precision = Eigen::NumTraits<Scalar>::dummy_precision();
 
   52         cl.def(bp::init<>((bp::arg(
"self")), 
"Default constructor."))
 
   53           .def(bp::init<const Matrix3 &>(
 
   54             (bp::arg(
"self"), bp::arg(
"I")), 
"Initialize from symmetrical matrix I of size 3x3."))
 
   55           .def(bp::init<const Vector6 &>(
 
   56             (bp::arg(
"self"), bp::arg(
"I")), 
"Initialize from vector I of size 6."))
 
   60             (bp::arg(
"self"), bp::arg(
"a0"), bp::arg(
"a1"), bp::arg(
"a2"), bp::arg(
"a3"),
 
   61              bp::arg(
"a4"), bp::arg(
"a5")),
 
   62             "Initialize from 6 scalar values."))
 
   64             bp::init<const Symmetric3 &>((bp::arg(
"self"), bp::arg(
"other")), 
"Copy constructor."))
 
   69             "Set all the components of *this to zero.")
 
   71           .staticmethod(
"Random")
 
   74             "Set all the components of *this randomly.")
 
   76           .staticmethod(
"Identity")
 
   79             "Set the components of *this to identity.")
 
   80 #ifndef PINOCCHIO_PYTHON_SKIP_COMPARISON_OPERATIONS 
   81           .def(bp::self == bp::self)
 
   82           .def(bp::self != bp::self)
 
   84 #ifndef PINOCCHIO_PYTHON_SKIP_COMPARISON_OPERATIONS 
   87             (bp::arg(
"self"), bp::arg(
"other"), bp::arg(
"prec") = dummy_precision),
 
   88             "Returns true if *this is approximately equal to other, within the precision given " 
   92             "Returns true if *this is approximately equal to the zero matrix, within the " 
   93             "precision given by prec.")
 
   96             "setDiagonal", &Symmetric3::template setDiagonal<Vector3Like>, bp::args(
"self", 
"diag"),
 
   97             "Set the diagonal elements of 3x3 matrix.")
 
   99             "inverse", &Symmetric3::template inverse<Matrix3Like>, bp::args(
"self", 
"res"),
 
  100             "Invert the symmetrical 3x3 matrix.")
 
  102           .def(bp::self - bp::other<SkewSquare>())
 
  103           .def(bp::self -= bp::other<SkewSquare>())
 
  104           .def(bp::self - bp::other<AlphaSkewSquare>())
 
  105           .def(bp::self -= bp::other<AlphaSkewSquare>())
 
  108             "6D vector containing the data of the symmetric 3x3 matrix.")
 
  111             "Returns a matrix representation of the data.")
 
  114             "vxs", &Symmetric3::template vxs<Vector3>, bp::args(
"v", 
"S3"),
 
  115             "Performs the operation \f$ M = [v]_{\times} S_{3} \f$., Apply the cross product of " 
  116             "v on each column of S and return result matrix M.")
 
  119             "svx", &Symmetric3::template vxs<Vector3>, bp::args(
"v", 
"S3"),
 
  120             "Performs the operation \f$ M = S_{3} [v]_{\times} \f$.")
 
  123             "rhsMult", &Symmetric3::template rhsMult<Vector3, Vector3>,
 
  124             bp::args(
"SE3", 
"vin", 
"vout"))
 
  125           .staticmethod(
"rhsMult")
 
  127           .def(bp::self + bp::self)
 
  128           .def(bp::self += bp::self)
 
  129           .def(bp::self - bp::self)
 
  130           .def(bp::self -= bp::self)
 
  131           .def(bp::self *= bp::other<Scalar>())
 
  132           .def(bp::self * bp::other<Vector3Like>())
 
  133           .def(bp::self - bp::other<Matrix3Like>())
 
  134           .def(bp::self + bp::other<Matrix3Like>())
 
  138             "Computes L for a symmetric matrix S.")
 
  140             "rotate", &Symmetric3::template rotate<Matrix3>, bp::args(
"self", 
"R"),
 
  143 #ifndef PINOCCHIO_PYTHON_NO_SERIALIZATION 
  161         bp::class_<Symmetric3>(
 
  163           "This class represents symmetric 3x3 matrices.\n\n" 
  164           "Supported operations ...",
 
  178           return bp::make_tuple(I);
 
  187 #endif // __pinocchio_python_spatial_symmetric3_hpp__