chrono::ChFunctionRepeat Class Reference
Description
Repeat function: y = __/__/__/
Repeats a slice of a function, periodically. Returns:
f_repeat(slice_start + mod(t + slice_shift, slice_width))
Note: for infinite slice_width and zero slice_start, you can use slice_shift to simply 'translate' the function on abscissa.
#include <ChFunctionRepeat.h>
Inheritance diagram for chrono::ChFunctionRepeat:
Collaboration diagram for chrono::ChFunctionRepeat:
Public Member Functions | |
ChFunctionRepeat (std::shared_ptr< ChFunction > func, double start=0, double length=1, double phase=0) | |
ChFunctionRepeat (const ChFunctionRepeat &other) | |
virtual ChFunctionRepeat * | Clone () const override |
"Virtual" copy constructor (covariant return type). | |
virtual Type | GetType () const override |
Return the unique function type identifier. | |
virtual double | GetVal (double x) const override |
Return the function output for input x. More... | |
void | SetSliceStart (double start) |
Set the starting point of the slice that should be repeated. | |
double | GetSliceStart () const |
Get the starting point of the slice that should be repeated. | |
void | SetSliceWidth (double length) |
Set the width of the slice that should be repeated. | |
double | GetSliceWidth () const |
Get the width of the slice that should be repeated. | |
void | SetSliceShift (double phase) |
Set the phase shift of the slice that should be repeated. | |
double | GetSliceShift () const |
Get the phase shift of the slice that should be repeated. | |
void | SetRepeatedFunction (std::shared_ptr< ChFunction > func) |
Set the function to be repeated. | |
std::shared_ptr< ChFunction > | GetRepeatedFunction () |
Get the function to be repeated. | |
virtual void | ArchiveOut (ChArchiveOut &archive) override |
Method to allow serialization of transient data to archives. | |
virtual void | ArchiveIn (ChArchiveIn &archive) override |
Method to allow de-serialization of transient data from archives. | |
Public Member Functions inherited from chrono::ChFunction | |
ChFunction (const ChFunction &other) | |
virtual double | GetDer (double x) const |
Return the first derivative of the function. More... | |
virtual double | GetDer2 (double x) const |
Return the second derivative of the function. More... | |
virtual double | GetDer3 (double x) const |
Return the third derivative of the function. More... | |
virtual double | GetDerN (double x, int der_order) const |
Return the Nth derivative of the function (up to 3rd derivative). More... | |
virtual double | GetWeight (double x) const |
Return the weight of the function. More... | |
virtual void | Update (double x) |
Update the function at the provided value of its argument. | |
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]. More... | |
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]. More... | |
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]. More... | |
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]. More... | |
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]. More... | |
virtual double | GetPositiveAccelerationCoeff () const |
Compute the positive acceleration coefficient. More... | |
virtual double | GetNegativeAccelerationCoeff () const |
Compute the negative acceleration coefficient. More... | |
virtual double | GetVelocityCoefficient () const |
Compute the velocity coefficient. More... | |
virtual void | OutputToASCIIFile (std::ostream &file, double xmin, double xmax, int samples, char delimiter) |
Store X-Y pairs to an ASCII File. More... | |
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). More... | |
double | operator() (double arg) const |
Alias operator of the GetVal function. | |
Additional Inherited Members | |
Public Types inherited from chrono::ChFunction | |
enum | 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
◆ GetVal()
|
overridevirtual |
Return the function output for input x.
Must be overridden by specialized classes.
Implements chrono::ChFunction.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono/functions/ChFunctionRepeat.h
- /builds/uwsbel/chrono/src/chrono/functions/ChFunctionRepeat.cpp