jntspaceinertiamatrix.hpp
Go to the documentation of this file.
00001 // Copyright  (C)  2009  Dominick Vanthienen <dominick dot vanthienen at mech dot kuleuven dot be>
00002 
00003 // Version: 1.0
00004 // Author: Dominick Vanthienen <dominick dot vanthienen at mech dot kuleuven dot be>
00005 // Maintainer: Dominick Vanthienen <ruben dot smits at mech dot kuleuven dot be>
00006 // URL: http://www.orocos.org/kdl
00007 
00008 // This library is free software; you can redistribute it and/or
00009 // modify it under the terms of the GNU Lesser General Public
00010 // License as published by the Free Software Foundation; either
00011 // version 2.1 of the License, or (at your option) any later version.
00012 
00013 // This library is distributed in the hope that it will be useful,
00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 // Lesser General Public License for more details.
00017 
00018 // You should have received a copy of the GNU Lesser General Public
00019 // License along with this library; if not, write to the Free Software
00020 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00021 
00022 #ifndef KDL_JNTSPACEINERTIAMATRIX_HPP
00023 #define KDL_JNTSPACEINERTIAMATRIX_HPP
00024 
00025 #include "frames.hpp"
00026 #include "jacobian.hpp"
00027 #include "jntarray.hpp"
00028 
00029 #include <Eigen/Core>
00030 
00031 namespace KDL
00032 {
00070     class JntSpaceInertiaMatrix
00071     {
00072     public:
00073         Eigen::MatrixXd data;
00074 
00082         JntSpaceInertiaMatrix();
00093         explicit JntSpaceInertiaMatrix(int size);
00097         JntSpaceInertiaMatrix(const JntSpaceInertiaMatrix& arg);
00098         ~JntSpaceInertiaMatrix();
00108         void resize(unsigned int newSize);
00109                 
00110         JntSpaceInertiaMatrix& operator = ( const JntSpaceInertiaMatrix& arg);
00118         double operator()(unsigned int i,unsigned int j)const;
00126         double& operator()(unsigned int i,unsigned int j);
00131         unsigned int rows()const;
00135         unsigned int columns()const;
00136 
00137         friend void Add(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2,JntSpaceInertiaMatrix& dest);
00138         friend void Subtract(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2,JntSpaceInertiaMatrix& dest);
00139         friend void Multiply(const JntSpaceInertiaMatrix& src,const double& factor,JntSpaceInertiaMatrix& dest);
00140         friend void Divide(const JntSpaceInertiaMatrix& src,const double& factor,JntSpaceInertiaMatrix& dest);
00141         friend void Multiply(const JntSpaceInertiaMatrix& src, const JntArray& vec, JntArray& dest);
00142         friend void SetToZero(JntSpaceInertiaMatrix& matrix);
00143         friend bool Equal(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2,double eps);
00144         friend bool operator==(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2);
00145         //friend bool operator!=(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2);
00146     };
00147 
00148     bool operator==(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2);
00149     //bool operator!=(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2);
00150 
00160     void Add(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2,JntSpaceInertiaMatrix& dest);
00161 
00171     void Subtract(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2,JntSpaceInertiaMatrix& dest);
00172 
00182     void Multiply(const JntSpaceInertiaMatrix& src,const double& factor,JntSpaceInertiaMatrix& dest);
00183 
00193     void Divide(const JntSpaceInertiaMatrix& src,const double& factor,JntSpaceInertiaMatrix& dest);
00194 
00207     void Multiply(const JntSpaceInertiaMatrix& src, const JntArray& vec, JntArray& dest);
00208 
00214     void SetToZero(JntSpaceInertiaMatrix& matrix);
00215 
00226     bool Equal(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2,double eps=epsilon);
00227 
00228     bool operator==(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2);
00229 
00230 }
00231 
00232 #endif


orocos_kdl
Author(s):
autogenerated on Wed Aug 26 2015 15:14:14