sokobo
Loading...
Searching...
No Matches
NumericalMethods Class Reference

Static Public Member Functions

static double bisectionMethod (std::function< double(double)> f, double a, double b, double tolerance=1e-10)
 
static double newtonRaphson (std::function< double(double)> f, std::function< double(double)> df, double x0, double tolerance=1e-10)
 
static double secantMethod (std::function< double(double)> f, double x0, double x1, double tolerance=1e-10)
 
static std::vector< double > polynomialRoots (const Polynomial &p)
 
static std::vector< double > gaussianElimination (Matrix< double > A, std::vector< double > b)
 
static std::vector< double > LUDecomposition (const Matrix< double > &A, const std::vector< double > &b)
 
static std::vector< double > jacobiMethod (const Matrix< double > &A, const std::vector< double > &b, double tolerance=1e-10, int maxIterations=1000)
 
static std::vector< double > gaussSeidelMethod (const Matrix< double > &A, const std::vector< double > &b, double tolerance=1e-10, int maxIterations=1000)
 
static Polynomial lagrangeInterpolation (const std::vector< double > &x, const std::vector< double > &y)
 
static Polynomial newtonInterpolation (const std::vector< double > &x, const std::vector< double > &y)
 
static double splineInterpolation (const std::vector< double > &x, const std::vector< double > &y, double xi)
 
static double goldenSectionSearch (std::function< double(double)> f, double a, double b, double tolerance=1e-10)
 
static std::vector< double > gradientDescent (std::function< double(const std::vector< double > &)> f, std::function< std::vector< double >(const std::vector< double > &)> grad, std::vector< double > x0, double learningRate=0.01, double tolerance=1e-10)
 
static std::vector< double > newtonOptimization (std::function< double(const std::vector< double > &)> f, std::function< std::vector< double >(const std::vector< double > &)> grad, std::function< Matrix< double >(const std::vector< double > &)> hessian, std::vector< double > x0, double tolerance=1e-10)
 
static double mean (const std::vector< double > &data)
 
static double variance (const std::vector< double > &data)
 
static double standardDeviation (const std::vector< double > &data)
 
static double correlation (const std::vector< double > &x, const std::vector< double > &y)
 
static std::pair< double, double > linearRegression (const std::vector< double > &x, const std::vector< double > &y)
 
static double gamma (double x)
 
static double beta (double a, double b)
 
static double erf (double x)
 
static double besselJ (int n, double x)
 
static double legendreP (int n, double x)
 
static double hermiteH (int n, double x)
 

Detailed Description

Definition at line 7 of file numerical_methods.h.

Member Function Documentation

◆ besselJ()

double NumericalMethods::besselJ ( int  n,
double  x 
)
static

Definition at line 732 of file numerical_methods.cpp.

◆ beta()

double NumericalMethods::beta ( double  a,
double  b 
)
static

Definition at line 707 of file numerical_methods.cpp.

◆ bisectionMethod()

double NumericalMethods::bisectionMethod ( std::function< double(double)>  f,
double  a,
double  b,
double  tolerance = 1e-10 
)
static

Definition at line 20 of file numerical_methods.cpp.

◆ correlation()

double NumericalMethods::correlation ( const std::vector< double > &  x,
const std::vector< double > &  y 
)
static

Definition at line 606 of file numerical_methods.cpp.

◆ erf()

double NumericalMethods::erf ( double  x)
static

Definition at line 712 of file numerical_methods.cpp.

◆ gamma()

double NumericalMethods::gamma ( double  x)
static

Definition at line 668 of file numerical_methods.cpp.

◆ gaussianElimination()

std::vector< double > NumericalMethods::gaussianElimination ( Matrix< double >  A,
std::vector< double >  b 
)
static

Definition at line 205 of file numerical_methods.cpp.

◆ gaussSeidelMethod()

std::vector< double > NumericalMethods::gaussSeidelMethod ( const Matrix< double > &  A,
const std::vector< double > &  b,
double  tolerance = 1e-10,
int  maxIterations = 1000 
)
static

Definition at line 324 of file numerical_methods.cpp.

◆ goldenSectionSearch()

double NumericalMethods::goldenSectionSearch ( std::function< double(double)>  f,
double  a,
double  b,
double  tolerance = 1e-10 
)
static

Definition at line 460 of file numerical_methods.cpp.

◆ gradientDescent()

std::vector< double > NumericalMethods::gradientDescent ( std::function< double(const std::vector< double > &)>  f,
std::function< std::vector< double >(const std::vector< double > &)>  grad,
std::vector< double >  x0,
double  learningRate = 0.01,
double  tolerance = 1e-10 
)
static

Definition at line 492 of file numerical_methods.cpp.

◆ hermiteH()

double NumericalMethods::hermiteH ( int  n,
double  x 
)
static

Definition at line 789 of file numerical_methods.cpp.

◆ jacobiMethod()

std::vector< double > NumericalMethods::jacobiMethod ( const Matrix< double > &  A,
const std::vector< double > &  b,
double  tolerance = 1e-10,
int  maxIterations = 1000 
)
static

Definition at line 288 of file numerical_methods.cpp.

◆ lagrangeInterpolation()

Polynomial NumericalMethods::lagrangeInterpolation ( const std::vector< double > &  x,
const std::vector< double > &  y 
)
static

Definition at line 362 of file numerical_methods.cpp.

◆ legendreP()

double NumericalMethods::legendreP ( int  n,
double  x 
)
static

Definition at line 763 of file numerical_methods.cpp.

◆ linearRegression()

std::pair< double, double > NumericalMethods::linearRegression ( const std::vector< double > &  x,
const std::vector< double > &  y 
)
static

Definition at line 636 of file numerical_methods.cpp.

◆ LUDecomposition()

std::vector< double > NumericalMethods::LUDecomposition ( const Matrix< double > &  A,
const std::vector< double > &  b 
)
static

Definition at line 260 of file numerical_methods.cpp.

◆ mean()

double NumericalMethods::mean ( const std::vector< double > &  data)
static

Definition at line 576 of file numerical_methods.cpp.

◆ newtonInterpolation()

Polynomial NumericalMethods::newtonInterpolation ( const std::vector< double > &  x,
const std::vector< double > &  y 
)
static

Definition at line 391 of file numerical_methods.cpp.

◆ newtonOptimization()

std::vector< double > NumericalMethods::newtonOptimization ( std::function< double(const std::vector< double > &)>  f,
std::function< std::vector< double >(const std::vector< double > &)>  grad,
std::function< Matrix< double >(const std::vector< double > &)>  hessian,
std::vector< double >  x0,
double  tolerance = 1e-10 
)
static

Definition at line 525 of file numerical_methods.cpp.

◆ newtonRaphson()

double NumericalMethods::newtonRaphson ( std::function< double(double)>  f,
std::function< double(double)>  df,
double  x0,
double  tolerance = 1e-10 
)
static

Definition at line 57 of file numerical_methods.cpp.

◆ polynomialRoots()

std::vector< double > NumericalMethods::polynomialRoots ( const Polynomial p)
static

Definition at line 121 of file numerical_methods.cpp.

◆ secantMethod()

double NumericalMethods::secantMethod ( std::function< double(double)>  f,
double  x0,
double  x1,
double  tolerance = 1e-10 
)
static

Definition at line 89 of file numerical_methods.cpp.

◆ splineInterpolation()

double NumericalMethods::splineInterpolation ( const std::vector< double > &  x,
const std::vector< double > &  y,
double  xi 
)
static

Definition at line 430 of file numerical_methods.cpp.

◆ standardDeviation()

double NumericalMethods::standardDeviation ( const std::vector< double > &  data)
static

Definition at line 601 of file numerical_methods.cpp.

◆ variance()

double NumericalMethods::variance ( const std::vector< double > &  data)
static

Definition at line 585 of file numerical_methods.cpp.


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