Exponential Functions
|
A class representing an Exponential Function (e.g 2x^2 + 4x - 1),. More...
#include <Exponential.h>
Public Member Functions | |
Function (const std::vector< int > &constnts) | |
Constructor for Function class. | |
Function (std::vector< int > &&constnts) | |
Constructor for Function class. | |
Function (const Function &other)=default | |
Function (Function &&other) noexcept=default | |
Function & | operator= (const Function &other)=default |
Function & | operator= (Function &&other) noexcept=default |
Function< lrgst_expo > & | operator*= (const int &c) |
Function< lrgst_expo - 1 > | differential () const |
Calculates the differential (dy/dx) of the function. | |
std::vector< double > | get_real_roots (const GA_Options &options=GA_Options()) const |
Function that uses a genetic algorithm to find the approximate roots of the function. | |
double | solve_y (const double &x_val) const noexcept |
Function that solves for y when x = user value. | |
std::vector< double > | solve_x (const double &y_val, const GA_Options &options=GA_Options()) const |
Function that uses a genetic algorithm to find the values of x where y = user value. | |
Friends | |
std::vector< double > | QuadraticSolve (const Function< 2 > &f) |
Uses the quadratic function to solve the roots of an entered quadratic equation. | |
std::ostream & | operator<< (std::ostream &os, const Function< lrgst_expo > func) |
template<int e1, int e2, int r> | |
Function< r > | operator+ (const Function< e1 > &f1, const Function< e2 > &f2) |
template<int e1, int e2, int r> | |
Function< r > | operator- (const Function< e1 > &f1, const Function< e2 > &f2) |
Function< lrgst_expo > | operator* (const Function< lrgst_expo > &f, const int &c) |
A class representing an Exponential Function (e.g 2x^2 + 4x - 1),.
lrgst_expo | The largest exponent in the function (e.g 2 means largest exponent is x^2) |
JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo >::Function | ( | const std::vector< int > & | constnts | ) |
Constructor for Function class.
constnts | An array with the constants for the function (e.g 2, 1, 3 = 2x^2 + 1x - 3) size of array MUST be lrgst_expo + 1 |
JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo >::Function | ( | std::vector< int > && | constnts | ) |
Constructor for Function class.
constnts | An array with the constants for the function (e.g 2, 1, 3 = 2x^2 + 1x - 3) size of array MUST be lrgst_expo + 1 |
Function< lrgst_expo - 1 > JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo >::differential | ( | ) | const |
Calculates the differential (dy/dx) of the function.
std::vector< double > JRAMPERSAD::EXPONENTIAL::Function< lrgst_expo >::get_real_roots | ( | const GA_Options & | options = GA_Options() | ) | const |
Function that uses a genetic algorithm to find the approximate roots of the function.
options | GA_Options object specifying the options to run the algorithm |
|
inline |
Function that uses a genetic algorithm to find the values of x where y = user value.
y_val | The return value that you would like to find the approximate x values needed to solve when entered into the function |
options | GA_Options object specifying the options to run the algorithm |
|
noexcept |
Function that solves for y when x = user value.
x_val | the X Value you'd like the function to use |
Uses the quadratic function to solve the roots of an entered quadratic equation.
f | Quadratic function you'd like to find the roots of (Quadratic Function object is a Function<2> object |