26 JntSpaceInertiaMatrix::JntSpaceInertiaMatrix()
30 JntSpaceInertiaMatrix::JntSpaceInertiaMatrix(
int _size):
37 JntSpaceInertiaMatrix::JntSpaceInertiaMatrix(
const JntSpaceInertiaMatrix& arg):
42 JntSpaceInertiaMatrix& JntSpaceInertiaMatrix::operator = (
const JntSpaceInertiaMatrix& arg)
49 JntSpaceInertiaMatrix::~JntSpaceInertiaMatrix()
53 void JntSpaceInertiaMatrix::resize(
unsigned int newSize)
55 data.resize(newSize,newSize);
58 double JntSpaceInertiaMatrix::operator()(
unsigned int i,
unsigned int j)
const
63 double& JntSpaceInertiaMatrix::operator()(
unsigned int i,
unsigned int j)
68 unsigned int JntSpaceInertiaMatrix::rows()
const
70 return static_cast<unsigned int>(
data.rows());
73 unsigned int JntSpaceInertiaMatrix::columns()
const
75 return static_cast<unsigned int>(
data.cols());
79 void Add(
const JntSpaceInertiaMatrix& src1,
const JntSpaceInertiaMatrix& src2,JntSpaceInertiaMatrix& dest)
81 dest.data=src1.data+src2.data;
84 void Subtract(
const JntSpaceInertiaMatrix& src1,
const JntSpaceInertiaMatrix& src2,JntSpaceInertiaMatrix& dest)
86 dest.data=src1.data-src2.data;
89 void Multiply(
const JntSpaceInertiaMatrix& src,
const double& factor,JntSpaceInertiaMatrix& dest)
91 dest.data=factor*src.data;
94 void Divide(
const JntSpaceInertiaMatrix& src,
const double& factor,JntSpaceInertiaMatrix& dest)
96 dest.data=src.data/factor;
101 dest.
data=src.data.lazyProduct(vec.
data);
109 bool Equal(
const JntSpaceInertiaMatrix& src1,
const JntSpaceInertiaMatrix& src2,
double eps)
111 if(src1.rows()!=src2.rows()||src1.columns()!=src2.columns())
113 return (src1.data-src2.data).isZero(eps);
116 bool operator==(
const JntSpaceInertiaMatrix& src1,
const JntSpaceInertiaMatrix& src2){
return Equal(src1,src2);}