The Polynomial3 class represents a cubic polynomial with real coefficients p(x) = c0 x^3 + c1 x^2 + c2 x + c3. More...
#include <gz/math/Polynomial3.hh>
Public Member Functions | |
Polynomial3 ()=default | |
Constructor. | |
Polynomial3 (Vector4< T > _coeffs) | |
Constructor. | |
const Vector4< T > & | Coeffs () const |
Get the polynomial coefficients. | |
T | Evaluate (const T &_x) const |
Evaluate the polynomial at _x For non-finite _x , this function computes p(z) as z tends to _x . | |
T | Minimum () const |
Compute polynomial minimum. | |
T | Minimum (const Interval< T > &_interval) const |
Compute polynomial minimum in an _interval | |
T | Minimum (const Interval< T > &_interval, T &_xMin) const |
Compute polynomial minimum in an _interval | |
T | Minimum (T &_xMin) const |
Compute polynomial minimum. | |
T | operator() (const T &_x) const |
Call operator overload. | |
void | Print (std::ostream &_out, const std::string &_x="x") const |
Prints polynomial as p(_x ) to _out stream. | |
Static Public Member Functions | |
static Polynomial3 | Constant (T _value) |
Make a constant polynomial. | |
Detailed Description
class gz::math::Polynomial3< T >
The Polynomial3 class represents a cubic polynomial with real coefficients p(x) = c0 x^3 + c1 x^2 + c2 x + c3.
Example
Constructor & Destructor Documentation
◆ Polynomial3() [1/2]
|
default |
Constructor.
Referenced by Polynomial3< T >::Constant().
◆ Polynomial3() [2/2]
|
inlineexplicit |
Constructor.
- Parameters
-
[in] _coeffs coefficients c0 through c3, left to right
Member Function Documentation
◆ Coeffs()
Get the polynomial coefficients.
- Returns
- this polynomial coefficients
◆ Constant()
|
inlinestatic |
Make a constant polynomial.
- Returns
- a p(x) =
_value
polynomial
References Polynomial3< T >::Polynomial3().
◆ Evaluate()
Evaluate the polynomial at _x
For non-finite _x
, this function computes p(z) as z tends to _x
.
- Parameters
-
[in] _x polynomial argument
- Returns
- the result of evaluating p(
_x
)
References std::copysign(), numeric_limits::epsilon(), std::isfinite(), gz::math::isnan(), and std::isnan().
Referenced by Polynomial3< T >::Minimum(), and Polynomial3< T >::operator()().
◆ Minimum() [1/4]
|
inline |
Compute polynomial minimum.
- Returns
- the polynomial minimum (may not be finite)
References Polynomial3< T >::Minimum().
Referenced by Polynomial3< T >::Minimum(), Polynomial3< T >::Minimum(), and Polynomial3< T >::Minimum().
◆ Minimum() [2/4]
Compute polynomial minimum in an _interval
- Parameters
-
[in] _interval polynomial argument interval to check
- Returns
- the polynomial minimum in the given interval (may not be finite), or NaN if the interval is empty
References Polynomial3< T >::Minimum().
◆ Minimum() [3/4]
Compute polynomial minimum in an _interval
- Parameters
-
[in] _interval polynomial argument interval to check [out] _xMin polynomial argument that yields minimum, or NaN if the interval is empty
- Returns
- the polynomial minimum in the given interval, or NaN if the interval is empty
References numeric_limits::epsilon(), Polynomial3< T >::Evaluate(), numeric_limits::quiet_NaN(), and std::sqrt().
◆ Minimum() [4/4]
|
inline |
Compute polynomial minimum.
- Parameters
-
[out] _xMin polynomial argument that yields minimum
- Returns
- the polynomial minimum (may not be finite)
References Polynomial3< T >::Minimum().
◆ operator()()
◆ Print()
|
inline |
Prints polynomial as p(_x
) to _out
stream.
- Parameters
-
[in] _out Output stream to print to [in] _x Argument name to be used
References numeric_limits::epsilon().
The documentation for this class was generated from the following file: