#include <cubic_polynomial_curve1d.h>
◆ CubicPolynomialCurve1d() [1/3]
| apollo::planning::CubicPolynomialCurve1d::CubicPolynomialCurve1d |
( |
| ) |
|
|
default |
◆ ~CubicPolynomialCurve1d()
| virtual apollo::planning::CubicPolynomialCurve1d::~CubicPolynomialCurve1d |
( |
| ) |
|
|
virtualdefault |
◆ CubicPolynomialCurve1d() [2/3]
| apollo::planning::CubicPolynomialCurve1d::CubicPolynomialCurve1d |
( |
const std::array< double, 3 > & |
start, |
|
|
const double |
end, |
|
|
const double |
param |
|
) |
| |
◆ CubicPolynomialCurve1d() [3/3]
| apollo::planning::CubicPolynomialCurve1d::CubicPolynomialCurve1d |
( |
const double |
x0, |
|
|
const double |
dx0, |
|
|
const double |
ddx0, |
|
|
const double |
x1, |
|
|
const double |
param |
|
) |
| |
x0 is the value when f(x = 0); dx0 is the value when f'(x = 0); ddx0 is the value when f''(x = 0); f(x = param) = x1
在文件 cubic_polynomial_curve1d.cc 第 35 行定义.
39 {
40 ComputeCoefficients(x0, dx0, ddx0, x1, param);
42 start_condition_[0] = x0;
43 start_condition_[1] = dx0;
44 start_condition_[2] = ddx0;
45 end_condition_ = x1;
46}
◆ Coef()
| double apollo::planning::CubicPolynomialCurve1d::Coef |
( |
const size_t |
order | ) |
const |
|
overridevirtual |
◆ DerivedFromQuarticCurve()
| void apollo::planning::CubicPolynomialCurve1d::DerivedFromQuarticCurve |
( |
const PolynomialCurve1d & |
other | ) |
|
在文件 cubic_polynomial_curve1d.cc 第 48 行定义.
49 {
50 CHECK_EQ(other.Order(), 4U);
51 param_ = other.ParamLength();
52 for (size_t i = 1; i < 5; ++i) {
53 coef_[i - 1] = other.Coef(i) * static_cast<double>(i);
54 }
55}
◆ Evaluate()
| double apollo::planning::CubicPolynomialCurve1d::Evaluate |
( |
const std::uint32_t |
order, |
|
|
const double |
p |
|
) |
| const |
|
overridevirtual |
实现了 apollo::planning::Curve1d.
在文件 cubic_polynomial_curve1d.cc 第 57 行定义.
58 {
59 switch (order) {
60 case 0: {
61 return ((coef_[3] * p + coef_[2]) * p + coef_[1]) * p + coef_[0];
62 }
63 case 1: {
64 return (3.0 * coef_[3] * p + 2.0 * coef_[2]) * p + coef_[1];
65 }
66 case 2: {
67 return 6.0 * coef_[3] * p + 2.0 * coef_[2];
68 }
69 case 3: {
70 return 6.0 * coef_[3];
71 }
72 default:
73 return 0.0;
74 }
75}
◆ Order()
| size_t apollo::planning::CubicPolynomialCurve1d::Order |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ ParamLength()
| double apollo::planning::CubicPolynomialCurve1d::ParamLength |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ ToString()
| std::string apollo::planning::CubicPolynomialCurve1d::ToString |
( |
| ) |
const |
|
overridevirtual |
该类的文档由以下文件生成: