![]() |
#include <Lagrange.h>
Public Member Functions | |
| Lagrange (unsigned int q) | |
| Constructor. | |
| Lagrange (const Lagrange &p) | |
| Copy constructor. | |
| ~Lagrange () | |
| Destructor. | |
| void | set (unsigned int i, real x) |
| Specify point. | |
| unsigned int | size () const |
| Return number of points. | |
| unsigned int | degree () const |
| Return degree. | |
| real | point (unsigned int i) const |
| Return point. | |
| real | operator() (unsigned int i, real x) |
| Return value of polynomial i at given point x. | |
| real | eval (unsigned int i, real x) |
| Return value of polynomial i at given point x. | |
| real | ddx (unsigned int i, real x) |
| Return derivate of polynomial i at given point x. | |
| real | dqdx (unsigned int i) |
| Return derivative q (a constant) of polynomial. | |
| void | show () const |
Friends | |
| LogStream & | operator<< (LogStream &stream, const Lagrange &p) |
| Output. | |
Example: q = 1 (n = 2)
Lagrange p(1); p.set(0, 0.0); p.set(1, 1.0);
This creates a Lagrange polynomial (actually two Lagrange polynomials):
p(0,x) = 1 - x (one at x = 0, zero at x = 1) p(1,x) = x (zero at x = 0, one at x = 1)
|
|
Constructor.
|
|
|
Copy constructor.
|
|
|
Destructor.
|
|
||||||||||||
|
Return derivate of polynomial i at given point x.
|
|
|
Return degree.
|
|
|
Return derivative q (a constant) of polynomial.
|
|
||||||||||||
|
Return value of polynomial i at given point x.
|
|
||||||||||||
|
Return value of polynomial i at given point x.
|
|
|
Return point.
|
|
||||||||||||
|
Specify point.
|
|
|
|
|
|
Return number of points.
|
|
||||||||||||
|
Output.
|
![]()
Documentation automatically generated with Doxygen on 10 Sep 2004.