Abstract class for all BasisFunction inheritance.
More...
#include <Basis.h>
|
| BasisFunction (unsigned int polyOrd, unsigned int nbins, bool isFinite, bool zeroOrder, double boundLow, double boundUp) |
| Constructor. More...
|
|
unsigned int | GetOrder () |
| Gets the order of the current polynomial. More...
|
|
unsigned int | GetBins () |
| Gets the number of bins for the discretization. More...
|
|
bool | GetZeroOrder () |
| Gets the flag for constant-order polynomials. More...
|
|
double | GetLower () |
| Gets the lower bound on the CV. More...
|
|
double | GetUpper () |
| Gets the upper bound on the CV. More...
|
|
double | GetRange () |
| Gets the magnitude of the range of bounds. More...
|
|
virtual double | GetNorm (int) |
| Gets the norm of the basis function. More...
|
|
virtual double | Evaluate (double, int) |
| Calculates the output of the basis function. More...
|
|
virtual double | EvalGrad (double, int) |
| Calculates the gradient of the basis function. More...
|
|
virtual double | Weight (double) |
| Calculates the weight of the basis function. More...
|
|
virtual | ~BasisFunction () |
| Destructor.
|
|
|
unsigned int | polyOrd_ |
| Order of the polynomial.
|
|
unsigned int | nbins_ |
| Number of bins.
|
|
bool | isFinite_ |
| Flag for finite-range polynomials.
|
|
bool | zeroOrder_ |
| Flag for constant-order polynomials.
|
|
double | boundLow_ |
| Lower bound on CV.
|
|
double | boundUp_ |
| Upper bound on CV.
|
|
Abstract class for all BasisFunction inheritance.
Definition at line 59 of file Basis.h.
◆ BasisFunction()
SSAGES::BasisFunction::BasisFunction |
( |
unsigned int |
polyOrd, |
|
|
unsigned int |
nbins, |
|
|
bool |
isFinite, |
|
|
bool |
zeroOrder, |
|
|
double |
boundLow, |
|
|
double |
boundUp |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
polyOrd | Order of polynomial. |
nbins | Number of bins. |
isFinite | Flag for finite-range polynomials. |
zeroOrder | Flag for constant-order polynomials. |
boundLow | Lower bounds of restraint springs. |
boundUp | Upper bounds of restraint springs. |
Constructs an instance of the Basis function class, which can have multiple different inherited forms.
Definition at line 82 of file Basis.h.
bool zeroOrder_
Flag for constant-order polynomials.
double boundLow_
Lower bound on CV.
double boundUp_
Upper bound on CV.
unsigned int nbins_
Number of bins.
unsigned int polyOrd_
Order of the polynomial.
bool isFinite_
Flag for finite-range polynomials.
◆ Build()
BasisFunction * SSAGES::BasisFunction::Build |
( |
const Json::Value & |
json, |
|
|
const std::string & |
path, |
|
|
unsigned int |
nbins |
|
) |
| |
|
static |
Build BasisFunction from JSON value.
- Parameters
-
json | JSON value node. |
path | Path for JSON path specification. |
nbins | Number of bins. |
- Returns
- Pointer to new BasisFunction.
Definition at line 9 of file Basis.cpp.
11 auto type = json.get(
"type",
"none").asString();
12 if(type ==
"Legendre")
14 else if (type ==
"Chebyshev")
16 else if (type ==
"Fourier")
19 throw std::invalid_argument(
"Invalid basis set type \"" + type +
"\".");
static Chebyshev * Build(const Json::Value &json, const std::string &path, unsigned int nbins)
Build BasisFunction from JSON value.
static Fourier * Build(const Json::Value &json, const std::string &path, unsigned int nbins)
Build BasisFunction from JSON value.
static Legendre * Build(const Json::Value &json, const std::string &path, unsigned int nbins)
Build BasisFunction from JSON value.
References SSAGES::Chebyshev::Build(), SSAGES::Legendre::Build(), and SSAGES::Fourier::Build().
◆ EvalGrad()
virtual double SSAGES::BasisFunction::EvalGrad |
( |
double |
, |
|
|
int |
|
|
) |
| |
|
inlinevirtual |
◆ Evaluate()
virtual double SSAGES::BasisFunction::Evaluate |
( |
double |
, |
|
|
int |
|
|
) |
| |
|
inlinevirtual |
◆ GetBins()
unsigned int SSAGES::BasisFunction::GetBins |
( |
| ) |
|
|
inline |
Gets the number of bins for the discretization.
- Returns
- Number of bins.
Definition at line 103 of file Basis.h.
References nbins_.
◆ GetLower()
double SSAGES::BasisFunction::GetLower |
( |
| ) |
|
|
inline |
Gets the lower bound on the CV.
- Returns
- Lower bound on CV.
Definition at line 115 of file Basis.h.
References boundLow_.
◆ GetNorm()
virtual double SSAGES::BasisFunction::GetNorm |
( |
int |
| ) |
|
|
inlinevirtual |
◆ GetOrder()
unsigned int SSAGES::BasisFunction::GetOrder |
( |
| ) |
|
|
inline |
Gets the order of the current polynomial.
- Returns
- Order of current polynomial.
Definition at line 97 of file Basis.h.
References polyOrd_.
◆ GetRange()
double SSAGES::BasisFunction::GetRange |
( |
| ) |
|
|
inline |
◆ GetUpper()
double SSAGES::BasisFunction::GetUpper |
( |
| ) |
|
|
inline |
Gets the upper bound on the CV.
- Returns
- Upper bound on CV.
Definition at line 121 of file Basis.h.
References boundUp_.
◆ GetZeroOrder()
bool SSAGES::BasisFunction::GetZeroOrder |
( |
| ) |
|
|
inline |
Gets the flag for constant-order polynomials.
- Returns
- Flag for constant-order polynomials.
Definition at line 109 of file Basis.h.
References zeroOrder_.
◆ Weight()
virtual double SSAGES::BasisFunction::Weight |
( |
double |
| ) |
|
|
inlinevirtual |
Calculates the weight of the basis function.
- Parameters
-
val | Input value for function. |
- Returns
- Weight of function.
Reimplemented in SSAGES::Chebyshev.
Definition at line 174 of file Basis.h.
The documentation for this class was generated from the following files:
- /home/michael/development/SSAGES/src/Utility/Basis.h
- /home/michael/development/SSAGES/src/Utility/Basis.cpp