#include <comparable_cost.h>
◆ ComparableCost() [1/3]
| apollo::planning::ComparableCost::ComparableCost |
( |
| ) |
|
|
default |
◆ ComparableCost() [2/3]
| apollo::planning::ComparableCost::ComparableCost |
( |
const bool |
has_collision, |
|
|
const bool |
out_of_boundary, |
|
|
const bool |
out_of_lane, |
|
|
const double |
safety_cost_, |
|
|
const double |
smoothness_cost_ |
|
) |
| |
|
inline |
在文件 comparable_cost.h 第 29 行定义.
36 }
static const size_t OUT_OF_BOUNDARY
std::array< bool, 3 > cost_items
static const size_t OUT_OF_LANE
static const size_t HAS_COLLISION
◆ ComparableCost() [3/3]
| apollo::planning::ComparableCost::ComparableCost |
( |
const ComparableCost & |
| ) |
|
|
default |
◆ CompareTo()
| int apollo::planning::ComparableCost::CompareTo |
( |
const ComparableCost & |
other | ) |
const |
|
inline |
在文件 comparable_cost.h 第 39 行定义.
39 {
40 for (
size_t i = 0; i <
cost_items.size(); ++i) {
42 if (other.cost_items[i]) {
43 continue;
44 } else {
45 return 1;
46 }
47 } else {
48 if (other.cost_items[i]) {
49 return -1;
50 } else {
51 continue;
52 }
53 }
54 }
55
56 static constexpr double kEpsilon = 1e-12;
58 other.smoothness_cost;
59 if (std::fabs(diff) < kEpsilon) {
60 return 0;
61 } else if (diff > 0) {
62 return 1;
63 } else {
64 return -1;
65 }
66 }
float diff(Image< float > *I, int x1, int y1, int x2, int y2)
Dissimilarity measure between pixels
◆ operator+()
◆ operator+=()
◆ operator<()
| bool apollo::planning::ComparableCost::operator< |
( |
const ComparableCost & |
other | ) |
const |
|
inline |
◆ operator<=()
| bool apollo::planning::ComparableCost::operator<= |
( |
const ComparableCost & |
other | ) |
const |
|
inline |
◆ operator>()
| bool apollo::planning::ComparableCost::operator> |
( |
const ComparableCost & |
other | ) |
const |
|
inline |
◆ operator>=()
| bool apollo::planning::ComparableCost::operator>= |
( |
const ComparableCost & |
other | ) |
const |
|
inline |
◆ cost_items
| std::array<bool, 3> apollo::planning::ComparableCost::cost_items = {{false, false, false}} |
◆ HAS_COLLISION
| const size_t apollo::planning::ComparableCost::HAS_COLLISION = 0 |
|
static |
◆ OUT_OF_BOUNDARY
| const size_t apollo::planning::ComparableCost::OUT_OF_BOUNDARY = 1 |
|
static |
◆ OUT_OF_LANE
| const size_t apollo::planning::ComparableCost::OUT_OF_LANE = 2 |
|
static |
◆ safety_cost
| double apollo::planning::ComparableCost::safety_cost = 0.0f |
◆ smoothness_cost
| double apollo::planning::ComparableCost::smoothness_cost = 0.0f |
该类的文档由以下文件生成:
- modules/planning/planning_interface_base/task_base/optimizers/road_graph/comparable_cost.h