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 
44 public:
46  Polynome(int Degree);
47 
49  ~Polynome();
50 
52  double Compute(double t);
53 
55  double ComputeDerivative(double t);
56 
58  double ComputeSecDerivative(double t);
59 
61  double ComputeJerk(double t);
62 
64  void GetCoefficients(std::vector<double> &lCoefficients) const;
65 
67  void SetCoefficients(const std::vector<double> &lCoefficients);
68 
69  inline int Degree() { return m_Degree; };
70 
72  void print() const;
73 
74 protected:
76  int m_Degree;
77 
79  std::vector<double> m_Coefficients;
80 };
81 } // namespace PatternGeneratorJRL
82 #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:79
PatternGeneratorJRL::Polynome::Degree
int Degree()
Definition: Polynome.hh:69
PatternGeneratorJRL::Polynome::m_Degree
int m_Degree
Degree of the polynome.
Definition: Polynome.hh:76
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