|
| Lagrange (std::size_t q) |
| Constructor.
|
|
| Lagrange (const Lagrange &p) |
| Copy constructor.
|
|
void | set (std::size_t i, double x) |
|
std::size_t | size () const |
|
std::size_t | degree () const |
|
double | point (std::size_t i) const |
|
double | operator() (std::size_t i, double x) |
|
double | eval (std::size_t i, double x) |
|
double | ddx (std::size_t i, double x) |
|
double | dqdx (std::size_t i) |
|
std::string | str (bool verbose) const |
|
| Variable () |
| Create unnamed variable.
|
|
| Variable (const std::string name, const std::string label) |
| Create variable with given name and label.
|
|
| Variable (const Variable &variable) |
| Copy constructor.
|
|
virtual | ~Variable () |
| Destructor.
|
|
const Variable & | operator= (const Variable &variable) |
| Assignment operator.
|
|
void | rename (const std::string name, const std::string label) |
| Rename variable.
|
|
std::string | name () const |
| Return name.
|
|
std::string | label () const |
| Return label (description)
|
|
std::size_t | id () const |
|
Lagrange polynomial (basis) with given degree q determined by n = q + 1 nodal points.
Example: q = 1 (n = 2)
Lagrange p(1); p.set(0, 0.0); p.set(1, 1.0);
It is the callers responsibility that the points are distinct.
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)