Polynome.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2006, 2007, 2008, 2009, 2010,
3  *
4  * Florent Lamiraux
5  * Alireza Nakhaei
6  * Mathieu Poirier
7  * Olivier Stasse
8  *
9  * JRL, CNRS/AIST
10  *
11  * This file is part of walkGenJrl.
12  * walkGenJrl is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU Lesser General Public License as published by
14  * the Free Software Foundation, either version 3 of the License, or
15  * (at your option) any later version.
16  *
17  * walkGenJrl is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Lesser Public License for more details.
21  * You should have received a copy of the GNU Lesser General Public License
22  * along with walkGenJrl. If not, see <http://www.gnu.org/licenses/>.
23  *
24  * Research carried out within the scope of the
25  * Joint Japanese-French Robotics Laboratory (JRL)
26  */
31 #ifndef _POLYNOME_H_
32 #define _POLYNOME_H_
33 
34 #include <iostream>
35 #include <vector>
36 
37 using namespace ::std;
38 
39 namespace PatternGeneratorJRL {
40 
42 class Polynome {
43  public:
45  Polynome(int Degree);
46 
48  ~Polynome();
49 
51  double Compute(double t);
52 
54  double ComputeDerivative(double t);
55 
57  double ComputeSecDerivative(double t);
58 
60  double ComputeJerk(double t);
61 
63  void GetCoefficients(std::vector<double> &lCoefficients) const;
64 
66  void SetCoefficients(const std::vector<double> &lCoefficients);
67 
68  inline int Degree() { return m_Degree; };
69 
71  void print() const;
72 
73  protected:
75  int m_Degree;
76 
78  std::vector<double> m_Coefficients;
79 };
80 } // namespace PatternGeneratorJRL
81 #endif /* _POLYNOME_H_*/
PatternGeneratorJRL::Polynome::Compute
double Compute(double t)
Definition: Polynome.cpp:40
PatternGeneratorJRL::Polynome
Definition: Polynome.hh:42
PatternGeneratorJRL::Polynome::SetCoefficients
void SetCoefficients(const std::vector< double > &lCoefficients)
Definition: Polynome.cpp:80
PatternGeneratorJRL::Polynome::Polynome
Polynome(int Degree)
Definition: Polynome.cpp:32
PatternGeneratorJRL::Polynome::GetCoefficients
void GetCoefficients(std::vector< double > &lCoefficients) const
Definition: Polynome.cpp:76
PatternGeneratorJRL::Polynome::ComputeJerk
double ComputeJerk(double t)
Definition: Polynome.cpp:67
PatternGeneratorJRL::Polynome::ComputeDerivative
double ComputeDerivative(double t)
Definition: Polynome.cpp:49
PatternGeneratorJRL::Polynome::m_Coefficients
std::vector< double > m_Coefficients
Vector of coefficients.
Definition: Polynome.hh:78
PatternGeneratorJRL::Polynome::Degree
int Degree()
Definition: Polynome.hh:68
PatternGeneratorJRL::Polynome::m_Degree
int m_Degree
Degree of the polynome.
Definition: Polynome.hh:75
PatternGeneratorJRL::Polynome::print
void print() const
Definition: Polynome.cpp:84
PatternGeneratorJRL
\doc Simulate a rigid body
Definition: patterngeneratorinterface.hh:41
PatternGeneratorJRL::Polynome::~Polynome
~Polynome()
Definition: Polynome.cpp:38
PatternGeneratorJRL::Polynome::ComputeSecDerivative
double ComputeSecDerivative(double t)
Definition: Polynome.cpp:58