24 #include "fmatvec/fmatvec.h"
25 #include <mbsim/numerics/csparse.h>
26 #include <mbxmlutilshelper/dom.h>
27 #include <xercesc/dom/DOMDocument.hpp>
31 #include <boost/lexical_cast.hpp>
32 #include <boost/algorithm/string/trim.hpp>
36 std::string numtostr(
int i);
37 std::string numtostr(
double d);
38 template<
class Type,
class Row,
class Col>
40 std::ostringstream oss;
42 for(
int i=0;i<m.
rows()-1;i++) {
43 for(
int j=0;i<m.
cols()-1;j++) oss << m.e(i,j) <<
", ";
50 double sign(
double x);
58 double ArcTan(
double x,
double y);
66 inline std::string toStr(
const T &val) {
68 s << std::setprecision(std::numeric_limits<double>::digits10+1) << val;
79 static double cast(
const double &x) {
93 class ToDouble<fmatvec::RowVector<Row,double> > {
103 static Ret cast(
const char *x) {
111 static double cast(
const std::string &x) {
112 return boost::lexical_cast<
double>(boost::algorithm::trim_copy(x));
119 static Ret cast(
double x) {
120 return Ret(1,fmatvec::INIT,x);
127 static double cast(
double x) {
135 static Ret cast(
const fmatvec::VecV &x) {
143 static double cast(
const fmatvec::VecV &x) {
152 fmatvec::Vec3 computeTangential(
const fmatvec::Vec3 &n);
double ArcTan(double x, double y)
calculates planar angle in [0,2] with respect to Cartesian coordinates of: Arc Tangent (y/x) ...
Definition: utils.cc:51
Mat cs2Mat(cs *sparseMat)
calculate a fmatvec::Mat out of a sparse matrix
Definition: utils.cc:60