CoolProp
4.2.5
An open-source fluid property and humid air property database
|
#include <Spline.h>
Public Member Functions | |
SplineClass () | |
bool | build (void) |
bool | add_value_constraint (double x, double y) |
void | add_4value_constraints (double x1, double x2, double x3, double x4, double y1, double y2, double y3, double y4) |
bool | add_derivative_constraint (double x, double dydx) |
double | evaluate (double x) |
Public Attributes | |
double | a |
double | b |
double | c |
double | d |
Protected Attributes | |
int | Nconstraints |
std::vector< std::vector < double > > | A |
std::vector< double > | B |
A spline is a curve given by the form y = ax^3 + bx^2 + c*x + d As there are 4 constants, 4 constraints are needed to create the spline. These constraints could be the derivative or value at a point Often, the value and derivative of the value are known at two points.
SplineClass::SplineClass | ( | ) |
Definition at line 7 of file Spline.cpp.
void SplineClass::add_4value_constraints | ( | double | x1, |
double | x2, | ||
double | x3, | ||
double | x4, | ||
double | y1, | ||
double | y2, | ||
double | y3, | ||
double | y4 | ||
) |
Definition at line 42 of file Spline.cpp.
bool SplineClass::add_derivative_constraint | ( | double | x, |
double | dydx | ||
) |
Definition at line 49 of file Spline.cpp.
bool SplineClass::add_value_constraint | ( | double | x, |
double | y | ||
) |
Definition at line 29 of file Spline.cpp.
bool SplineClass::build | ( | void | ) |
Definition at line 13 of file Spline.cpp.
double SplineClass::evaluate | ( | double | x | ) |
Definition at line 62 of file Spline.cpp.