OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
#include <PolynomialTimeDependence.h>
Public Member Functions | |
PolynomialTimeDependence (std::vector< double > ptd) | |
PolynomialTimeDependence () | |
~PolynomialTimeDependence () | |
double | getValue (double time) |
PolynomialTimeDependence * | clone () |
Inform & | print (Inform &os) |
Public Member Functions inherited from AbstractTimeDependence | |
virtual | ~AbstractTimeDependence () |
Private Attributes | |
std::vector< double > | coeffs |
Additional Inherited Members | |
Static Public Member Functions inherited from AbstractTimeDependence | |
static std::shared_ptr< AbstractTimeDependence > | getTimeDependence (std::string name) |
static void | setTimeDependence (std::string name, std::shared_ptr< AbstractTimeDependence > time_dep) |
static std::string | getName (std::shared_ptr< AbstractTimeDependence > time_dep) |
Time dependence that follows a polynomial, like p_0 + p_1*t + p_2*t^2 + ... + p_i*t^i + ...
Definition at line 42 of file PolynomialTimeDependence.h.
|
inline |
Constructor
ptd | the polynomial coefficients p_i; can be of arbitrary length (user is responsible for issues like floating point precision). |
Definition at line 49 of file PolynomialTimeDependence.h.
|
inline |
Default Constructor makes a 0 length polynomial
Definition at line 52 of file PolynomialTimeDependence.h.
Referenced by clone().
|
inline |
Destructor does nothing
Definition at line 54 of file PolynomialTimeDependence.h.
|
inlinevirtual |
Inheritable copy constructor
Implements AbstractTimeDependence.
Definition at line 62 of file PolynomialTimeDependence.h.
References coeffs, and PolynomialTimeDependence().
|
inlinevirtual |
Return the polynomial Sum_i p_i t^i; returns 0 if p is of 0 length
Implements AbstractTimeDependence.
Definition at line 78 of file PolynomialTimeDependence.h.
References coeffs.
Print the polynomials
os | "Inform" stream to which the polynomials are printed. |
Definition at line 32 of file PolynomialTimeDependence.cpp.
References coeffs, endl(), and Inform::flags().
Referenced by operator<<().
|
private |
Definition at line 75 of file PolynomialTimeDependence.h.
Referenced by clone(), getValue(), and print().