Description
Function returnin a constant value.
#include <ChFunctionConst.h>


Public Member Functions | |
ChFunctionConst (double y_constant) | |
ChFunctionConst (const ChFunctionConst &other) | |
virtual ChFunctionConst * | Clone () const override |
"Virtual" copy constructor (covariant return type). | |
virtual Type | GetType () const override |
Returns the function type. | |
virtual double | GetVal (double x) const override |
Returns the function value at x (constant in this case). | |
virtual double | GetDer (double x) const override |
Returns the function first derivative (i.e. 0) | |
virtual double | GetDer2 (double x) const override |
Returns the function second derivative (i.e. 0) | |
void | SetConstant (double y_constant) |
Set the constant value of the function. | |
double | GetConstant () const |
Get the constant value of the function. | |
virtual void | ArchiveOut (ChArchiveOut &archive_out) override |
Method to allow serialization of transient data to archives. | |
virtual void | ArchiveIn (ChArchiveIn &archive_in) override |
Method to allow de-serialization of transient data from archives. | |
![]() | |
ChFunction (const ChFunction &other) | |
virtual double | GetDer3 (double x) const |
Return the third derivative of the function. | |
virtual double | GetDerN (double x, int der_order) const |
Return the Nth derivative of the function (up to 3rd derivative). | |
virtual double | GetWeight (double x) const |
Return the weight of the function (useful for applications where you need to mix different weighted ChFunctions) | |
virtual void | Update (double x) |
Update could be implemented by children classes, ex. to launch callbacks. | |
virtual double | GetMax (double xmin, double xmax, double sampling_step, int der_order) const |
Estimate the maximum of the function (or its der_order derivative) in the range [xmin, xmax], using sampling method. | |
virtual double | GetMin (double xmin, double xmax, double sampling_step, int der_order) const |
Estimate the minimum of the function (or its der_order derivative) in the range [xmin, xmax], using sampling method. | |
virtual double | GetMean (double xmin, double xmax, double sampling_step, int der_order) const |
Estimate the mean of the function (or its der_order derivative) in the range [xmin, xmax], using sampling method. | |
virtual double | GetSquaredMean (double xmin, double xmax, double sampling_step, int der_order) const |
Estimate the squared mean of the function (or its der_order derivative) in the range [xmin, xmax], using sampling method. | |
virtual double | GetIntegral (double xmin, double xmax, double sampling_step, int der_order) const |
Estimate the integral of the function (or its der_order derivative) over the range [xmin, xmax], using sampling method. | |
virtual double | GetPositiveAccelerationCoeff () const |
Computes the positive acceleration coefficient (inherited classes should override this). | |
virtual double | GetNegativeAccelerationCoeff () const |
Compute the negative acceleration coefficient (inherited classes should override this). | |
virtual double | GetVelocityCoefficient () const |
Compute the velocity coefficient (inherited classes must override this). | |
virtual void | OutputToASCIIFile (std::ostream &file, double xmin, double xmax, int samples, char delimiter) |
Store X-Y pairs to an ASCII File. | |
virtual ChMatrixDynamic | SampleUpToDerN (double xmin, double xmax, double step, int derN=0) |
Sample function on given interval [xmin, xmax], up to derN derivative (0 being the function ouput itself). | |
double | operator() (double arg) const |
Alias operator of the GetVal function. | |
Additional Inherited Members | |
![]() | |
enum class | Type { BSPLINE , CONSTANT , CONSTACC , CONSTJERK , CUSTOM , CYCLOIDAL , DERIVATIVE , FILLET3 , INTEGRAL , INTERP , LAMBDA , MIRROR , OPERATOR , POLY , POLY23 , POLY345 , RAMP , REPEAT , SEQUENCE , SINE , SINE_STEP } |
Enumeration of function types. | |
Member Function Documentation
◆ ArchiveIn()
|
overridevirtual |
Method to allow de-serialization of transient data from archives.
Reimplemented from chrono::ChFunction.
◆ ArchiveOut()
|
overridevirtual |
Method to allow serialization of transient data to archives.
Reimplemented from chrono::ChFunction.
◆ Clone()
|
inlineoverridevirtual |
"Virtual" copy constructor (covariant return type).
Implements chrono::ChFunction.
◆ GetDer()
|
inlineoverridevirtual |
Returns the function first derivative (i.e. 0)
Reimplemented from chrono::ChFunction.
◆ GetDer2()
|
inlineoverridevirtual |
Returns the function second derivative (i.e. 0)
Reimplemented from chrono::ChFunction.
◆ GetType()
|
inlineoverridevirtual |
Returns the function type.
Reimplemented from chrono::ChFunction.
◆ GetVal()
|
inlineoverridevirtual |
Returns the function value at x (constant in this case).
Implements chrono::ChFunction.
The documentation for this class was generated from the following files:
- C:/M/B/src/chrono-9.0.1/src/chrono/functions/ChFunctionConst.h
- C:/M/B/src/chrono-9.0.1/src/chrono/functions/ChFunctionConst.cpp