mbsimflexiblebody  4.0.0
taylor.h
00001 /* Copyright (C) 2004-2015 MBSim Development Team
00002  *
00003  * This library is free software; you can redistribute it and/or 
00004  * modify it under the terms of the GNU Lesser General Public 
00005  * License as published by the Free Software Foundation; either 
00006  * version 2.1 of the License, or (at your option) any later version. 
00007  *  
00008  * This library is distributed in the hope that it will be useful, 
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of 
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00011  * Lesser General Public License for more details. 
00012  *  
00013  * You should have received a copy of the GNU Lesser General Public 
00014  * License along with this library; if not, write to the Free Software 
00015  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
00016  *
00017  * Contact: thorsten.schindler@mytum.de
00018  */
00019 
00020 #ifndef TAYLOR_H_
00021 #define TAYLOR_H_
00022 
00023 #include <mbsim/functions/function.h>
00024 
00025 namespace MBSimFlexibleBody {
00026 
00027   template<typename T0, typename T1=T0, typename T2=T1> class Taylor {
00028     public:
00029       Taylor() { }
00030       Taylor(const T0 &M0_) : M0(M0_) { }
00031       Taylor(const T0 &M0_, const T1 &M1_) : M0(M0_), M1(M1_) { }
00032       Taylor(const T0 &M0_, const T1 &M1_, const T2 &M2_) : M0(M0_), M1(M1_), M2(M2_) { }
00033       void setM0(const T0 &M0_) { M0 = M0_; }
00034       void setM1(const T1 &M1_) { M1 = M1_; }
00035       void setM2(const T2 &M2_) { M2 = M2_; }
00036       const T0& getM0() const { return M0; }
00037       const T1& getM1() const { return M1; }
00038       const T2& getM2() const { return M2; }
00039       T0& getM0() { return M0; }
00040       T1& getM1() { return M1; }
00041       T2& getM2() { return M2; }
00042     private:
00043       T0 M0;
00044       T1 M1;
00045       T2 M2;
00046   };
00047 
00048 }
00049 
00050 #endif /*TAYLOR_H_*/
00051