CLHEP
2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
InterpolatingPolynomial.hh
Go to the documentation of this file.
1
// -*- C++ -*-
2
// $Id:
3
// ------------------------------------------------------------------------------//
4
// Lagrange's Interpolating Polynomial //
5
// //
6
// //
7
// Joe Boudreau. //
8
// //
9
// ------------------------------------------------------------------------------//
10
#ifndef _InterpolatingPolynomial_h_
11
#define _InterpolatingPolynomial_h_
12
#include "CLHEP/GenericFunctions/AbsFunction.hh"
13
#include "CLHEP/GenericFunctions/Parameter.hh"
14
#include <vector>
15
namespace
Genfun
{
16
17
/**
18
* @author
19
* @ingroup genfun
20
*/
21
class
InterpolatingPolynomial
:
public
AbsFunction
{
22
23
FUNCTION_OBJECT_DEF
(
InterpolatingPolynomial
)
24
25
public
:
26
27
// Constructor
28
InterpolatingPolynomial
();
29
30
// Copy constructor
31
InterpolatingPolynomial
(
const
InterpolatingPolynomial
&right);
32
33
// Destructor:
34
virtual
~InterpolatingPolynomial
();
35
36
// Retreive function value
37
virtual
double
operator ()
(
double
argument)
const override
;
38
virtual
double
operator ()
(
const
Argument
& a)
const override
{
return
operator()
(a[0]);}
39
40
// Puncture this thing:
41
void
addPoint
(
double
x,
double
y);
42
43
// Get the range:
44
void
getRange
(
double
& min,
double
& max)
const
;
45
46
private
:
47
48
// It is illegal to assign an adjustable constant
49
const
InterpolatingPolynomial
& operator=(
const
InterpolatingPolynomial
&right);
50
51
std::vector<std::pair<double,double> > xPoints;
52
};
53
}
// namespace Genfun
54
#endif
FUNCTION_OBJECT_DEF
#define FUNCTION_OBJECT_DEF(classname)
Definition:
AbsFunction.hh:143
Genfun::AbsFunction
Definition:
AbsFunction.hh:48
Genfun::Argument
Definition:
Argument.hh:17
Genfun::InterpolatingPolynomial
Definition:
InterpolatingPolynomial.hh:21
Genfun::InterpolatingPolynomial::getRange
void getRange(double &min, double &max) const
Definition:
InterpolatingPolynomial.cc:64
Genfun::InterpolatingPolynomial::~InterpolatingPolynomial
virtual ~InterpolatingPolynomial()
Definition:
InterpolatingPolynomial.cc:21
Genfun::InterpolatingPolynomial::operator()
virtual double operator()(double argument) const override
Definition:
InterpolatingPolynomial.cc:24
Genfun::InterpolatingPolynomial::InterpolatingPolynomial
InterpolatingPolynomial()
Definition:
InterpolatingPolynomial.cc:13
Genfun::InterpolatingPolynomial::addPoint
void addPoint(double x, double y)
Definition:
InterpolatingPolynomial.cc:60
Genfun
Definition:
Abs.hh:14
CLHEP-CLHEP_2_4_6_4
GenericFunctions
GenericFunctions
InterpolatingPolynomial.hh
Generated by
1.9.6