Describes a Cubic Polynomial so: f(x) = a + bx + cx^2 + dx^3. More...
#include <CubicPolynomial.h>
Public Types | |
using | value_type = double |
Public Member Functions | |
CubicPolynomial ()=default | |
CubicPolynomial (const CubicPolynomial &)=default | |
CubicPolynomial (const value_type &a, const value_type &b, const value_type &c, const value_type &d) | |
CubicPolynomial (const value_type &a, const value_type &b, const value_type &c, const value_type &d, const value_type &s) | |
value_type | Evaluate (const value_type &x) const |
Evaluates f(x) = a + bx + cx^2 + dx^3. More... | |
value_type | GetA () const |
value_type | GetB () const |
value_type | GetC () const |
value_type | GetD () const |
value_type | GetS () const |
CubicPolynomial & | operator*= (const value_type &rhs) |
CubicPolynomial & | operator+= (const CubicPolynomial &rhs) |
void | Set (const value_type &a, const value_type &b, const value_type &c, const value_type &d, const value_type &s) |
void | Set (const value_type &a, const value_type &b, const value_type &c, const value_type &d) |
value_type | Tangent (const value_type &x) const |
Evaluates the tangent using df/dx = b + 2cx + 3dx^2. More... | |
Private Attributes | |
value_type | _s |
std::array< value_type, 4 > | _v = {0.0, 0.0, 0.0, 0.0} |
Friends | |
CubicPolynomial | operator* (CubicPolynomial lhs, const value_type &rhs) |
CubicPolynomial | operator* (const value_type &lhs, CubicPolynomial rhs) |
CubicPolynomial | operator+ (CubicPolynomial lhs, const CubicPolynomial &rhs) |
Describes a Cubic Polynomial so: f(x) = a + bx + cx^2 + dx^3.
Definition at line 18 of file CubicPolynomial.h.
using carla::geom::CubicPolynomial::value_type = double |
Definition at line 21 of file CubicPolynomial.h.
|
default |
|
default |
|
inline |
Definition at line 31 of file CubicPolynomial.h.
References _s.
|
inline |
Definition at line 39 of file CubicPolynomial.h.
References _s.
|
inline |
Evaluates f(x) = a + bx + cx^2 + dx^3.
Definition at line 106 of file CubicPolynomial.h.
References _v.
Referenced by carla::road::element::RoadInfoElevation::Evaluate(), and carla::road::Map::GetWaypoint().
|
inline |
Definition at line 55 of file CubicPolynomial.h.
References _v.
|
inline |
Definition at line 59 of file CubicPolynomial.h.
References _v.
|
inline |
Definition at line 63 of file CubicPolynomial.h.
References _v.
|
inline |
Definition at line 67 of file CubicPolynomial.h.
References _v.
|
inline |
Definition at line 71 of file CubicPolynomial.h.
References _s.
|
inline |
Definition at line 132 of file CubicPolynomial.h.
References _v.
|
inline |
Definition at line 120 of file CubicPolynomial.h.
References _v.
|
inline |
Definition at line 79 of file CubicPolynomial.h.
|
inline |
Definition at line 92 of file CubicPolynomial.h.
|
inline |
Evaluates the tangent using df/dx = b + 2cx + 3dx^2.
Definition at line 112 of file CubicPolynomial.h.
References _v.
Referenced by carla::road::element::RoadInfoElevation::Evaluate().
|
friend |
Definition at line 139 of file CubicPolynomial.h.
|
friend |
Definition at line 144 of file CubicPolynomial.h.
|
friend |
Definition at line 127 of file CubicPolynomial.h.
|
private |
Definition at line 162 of file CubicPolynomial.h.
Referenced by CubicPolynomial(), GetS(), and Set().
|
private |
Definition at line 159 of file CubicPolynomial.h.
Referenced by Evaluate(), GetA(), GetB(), GetC(), GetD(), operator*=(), operator+=(), Set(), and Tangent().