CoolProp  6.6.0
An open-source fluid property and humid air property database
Public Member Functions | Public Attributes | Protected Attributes | List of all members
SplineClass Class Reference

Detailed Description

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.

Definition at line 436 of file CPnumerics.h.

#include <CPnumerics.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
 

Constructor & Destructor Documentation

◆ SplineClass()

SplineClass::SplineClass ( )
inline

Definition at line 445 of file CPnumerics.h.

Member Function Documentation

◆ add_4value_constraints()

void SplineClass::add_4value_constraints ( double  x1,
double  x2,
double  x3,
double  x4,
double  y1,
double  y2,
double  y3,
double  y4 
)

Definition at line 183 of file CPnumerics.cpp.

◆ add_derivative_constraint()

bool SplineClass::add_derivative_constraint ( double  x,
double  dydx 
)

Definition at line 189 of file CPnumerics.cpp.

◆ add_value_constraint()

bool SplineClass::add_value_constraint ( double  x,
double  y 
)

Definition at line 172 of file CPnumerics.cpp.

◆ build()

bool SplineClass::build ( void  )

Definition at line 160 of file CPnumerics.cpp.

◆ evaluate()

double SplineClass::evaluate ( double  x)

Definition at line 200 of file CPnumerics.cpp.

Member Data Documentation

◆ A

std::vector<std::vector<double> > SplineClass::A
protected

Definition at line 440 of file CPnumerics.h.

◆ a

double SplineClass::a

Definition at line 444 of file CPnumerics.h.

◆ B

std::vector<double> SplineClass::B
protected

Definition at line 441 of file CPnumerics.h.

◆ b

double SplineClass::b

Definition at line 444 of file CPnumerics.h.

◆ c

double SplineClass::c

Definition at line 444 of file CPnumerics.h.

◆ d

double SplineClass::d

Definition at line 444 of file CPnumerics.h.

◆ Nconstraints

int SplineClass::Nconstraints
protected

Definition at line 439 of file CPnumerics.h.


The documentation for this class was generated from the following files: