CoolProp  4.2.5
An open-source fluid property and humid air property database
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Protected Attributes | List of all members
SplineClass Class Reference

#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
 

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 9 of file Spline.h.

Constructor & Destructor Documentation

SplineClass::SplineClass ( )

Definition at line 7 of file Spline.cpp.

Member Function Documentation

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.

Member Data Documentation

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

Definition at line 13 of file Spline.h.

double SplineClass::a

Definition at line 16 of file Spline.h.

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

Definition at line 14 of file Spline.h.

double SplineClass::b

Definition at line 16 of file Spline.h.

double SplineClass::c

Definition at line 16 of file Spline.h.

double SplineClass::d

Definition at line 16 of file Spline.h.

int SplineClass::Nconstraints
protected

Definition at line 12 of file Spline.h.


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