Loading...
Searching...
No Matches
piecewisePolynomial.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: piecewisePolynomial.h,v 1.19 2005/12/23 17:01:48 amoll Exp $
//
#ifndef BALL_MATHS_PPOLYNOMIAL_H
#define BALL_MATHS_PPOLYNOMIAL_H
#ifndef BALL_MATHS_PIECEWISEFUNCTION_H
# include <BALL/MATHS/piecewiseFunction.h>
#endif
namespace BALL
{
class BALL_EXPORT PiecewisePolynomial
: public PiecewiseFunction
{
public:
BALL_CREATE(PiecewisePolynomial)
PiecewisePolynomial();
PiecewisePolynomial(const PiecewisePolynomial& polynomial) ;
PiecewisePolynomial(Size degree, const std::vector<Interval>& intervals,
const std::vector<Coefficients>& coefficients) ;
virtual ~PiecewisePolynomial();
PiecewisePolynomial& operator = (const PiecewisePolynomial& poly);
virtual void clear();
void set(Size degree, const std::vector<Interval>& intervals, const std::vector<Coefficients>& coeffs);
void setDegree(Size degree);
Size getDegree() const;
virtual double operator () (double x) const;
bool operator == (const PiecewisePolynomial& poly) const;
virtual void dump (std::ostream& s = std::cout, Size depth = 0) const;
protected:
/*_ The degree of the polynomial
*/
Size degree_;
};
}
#endif // BALL_MATHS_PPPOLYNOMIAL_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
BALL::PiecewiseFunction::PiecewiseFunction
PiecewiseFunction()
BALL::PiecewisePolynomial::degree_
Size degree_
Definition piecewisePolynomial.h:111
BALL::PiecewisePolynomial::clear
virtual void clear()
BALL::PiecewisePolynomial::set
void set(Size degree, const std::vector< Interval > &intervals, const std::vector< Coefficients > &coeffs)
BALL::PiecewisePolynomial::PiecewisePolynomial
PiecewisePolynomial()
BALL::PiecewisePolynomial::getDegree
Size getDegree() const
get the degree of the polynomial
BALL::PiecewisePolynomial::dump
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
BALL::PiecewisePolynomial::setDegree
void setDegree(Size degree)
set the degree of the polynomial
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
BALL::Coefficients
std::vector< double > Coefficients
Definition piecewiseFunction.h:19
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
BALL::Interval
std::pair< double, double > Interval
Definition piecewiseFunction.h:23
std
STL namespace.
piecewiseFunction.h