MEASUR-Tools-Suite v1.0.11
The MEASUR Tools Suite is a collection of industrial efficiency calculations written in C++ and with bindings for compilation to WebAssembly.
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
CurveFitVal Class Reference

Curve Fit class. More...

#include <CurveFitVal.h>

Public Member Functions

 CurveFitVal (std::vector< double > xcoord, std::vector< double > ycoord, const std::size_t pdegree, const double loadFactor=0)
 
double calculate () const
 
double calculate (double) const
 

Public Attributes

std::vector< double > coeff
 

Private Member Functions

std::vector< double > Fit_Coefficients ()
 

Private Attributes

std::size_t pdegree
 
std::vector< double > xcoord
 
std::vector< double > ycoord
 
double loadFactor
 

Detailed Description

This contains the prototypes for the Curve Fit Value calculator.

Author
Subhankar Mishra (mishras)
Gina Accawi (accawigk)
Mark Root (mroot)
Bug:
No known bugs.

Definition at line 20 of file CurveFitVal.h.

Constructor & Destructor Documentation

◆ CurveFitVal()

CurveFitVal::CurveFitVal ( std::vector< double >  xcoord,
std::vector< double >  ycoord,
const std::size_t  pdegree,
const double  loadFactor = 0 
)
inline

Constructor

Parameters
xcoordvector of x coordinates as doubles
ycoordvector of y coordinates as doubles
pdegreeint, degree of polynomial curve
loadFactordouble, load factor - unitless

Definition at line 29 of file CurveFitVal.h.

Member Function Documentation

◆ calculate()

double CurveFitVal::calculate ( ) const

Calculates the curve fit value at required load factor

Returns
double, curve fit value

◆ Fit_Coefficients()

std::vector< double > CurveFitVal::Fit_Coefficients ( )
private

Array to store the coefficients of the curve.

Member Data Documentation

◆ coeff

std::vector<double> CurveFitVal::coeff

Definition at line 48 of file CurveFitVal.h.

◆ loadFactor

double CurveFitVal::loadFactor
private

load factor (here is the x coordinate, whose corresponding y coordinate is returned.

Definition at line 62 of file CurveFitVal.h.

◆ pdegree

std::size_t CurveFitVal::pdegree
private

Degree of polynomial curve

Definition at line 54 of file CurveFitVal.h.

◆ xcoord

std::vector<double> CurveFitVal::xcoord
private

x and y coordinates

Definition at line 58 of file CurveFitVal.h.

◆ ycoord

std::vector<double> CurveFitVal::ycoord
private

Definition at line 58 of file CurveFitVal.h.


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