Finish 3 ↖ ↗ F5 F6 ↖ ↗ 2 ↖ ↗ ↖ F2 F3 F4 ↖ ↗ ↖ 1 ↗ ↖ ^ F0 F1 F8 ↗ ↖ | 0 * *--F7---> ^ F9 | -1 0 1 2 3 Start Note. This graph consists of 10 one segment directed features.
| 56 | // |
| 57 | // Note. This graph consists of 10 one segment directed features. |
| 58 | unique_ptr<WorldGraph> BuildXXGraph(shared_ptr<EdgeEstimator> estimator) |
| 59 | { |
| 60 | unique_ptr<TestGeometryLoader> loader = make_unique<TestGeometryLoader>(); |
| 61 | loader->AddRoad(0 /* featureId */, true /* oneWay */, 1.0 /* speed */, |
| 62 | RoadGeometry::Points({{0.0, 0.0}, {1.0, 1.0}})); |
| 63 | loader->AddRoad(1 /* featureId */, true /* oneWay */, 1.0 /* speed */, |
| 64 | RoadGeometry::Points({{2.0, 0.0}, {1.0, 1.0}})); |
| 65 | loader->AddRoad(2 /* featureId */, true /* oneWay */, 1.0 /* speed */, |
| 66 | RoadGeometry::Points({{1.0, 1.0}, {0.0, 2.0}})); |
| 67 | loader->AddRoad(3 /* featureId */, true /* oneWay */, 1.0 /* speed */, |
| 68 | RoadGeometry::Points({{1.0, 1.0}, {2.0, 2.0}})); |
| 69 | loader->AddRoad(4 /* featureId */, true /* oneWay */, 1.0 /* speed */, |
| 70 | RoadGeometry::Points({{3.0, 1.0}, {2.0, 2.0}})); |
| 71 | loader->AddRoad(5 /* featureId */, true /* oneWay */, 1.0 /* speed */, |
| 72 | RoadGeometry::Points({{2.0, 2.0}, {1.0, 3.0}})); |
| 73 | loader->AddRoad(6 /* featureId */, true /* oneWay */, 1.0 /* speed */, |
| 74 | RoadGeometry::Points({{2.0, 2.0}, {3.0, 3.0}})); |
| 75 | loader->AddRoad(7 /* featureId */, true /* oneWay */, 1.0 /* speed */, |
| 76 | RoadGeometry::Points({{2.0, 0.0}, {3.0, 0.0}})); |
| 77 | loader->AddRoad(8 /* featureId */, true /* oneWay */, 1.0 /* speed */, |
| 78 | RoadGeometry::Points({{3.0, 0.0}, {3.0, 1.0}})); |
| 79 | loader->AddRoad(9 /* featureId */, true /* oneWay */, 1.0 /* speed */, |
| 80 | RoadGeometry::Points({{2.0, -1.0}, {2.0, 0.0}})); |
| 81 | |
| 82 | vector<Joint> const joints = { |
| 83 | MakeJoint({{0 /* feature id */, 0 /* point id */}}), /* joint at point (0, 0) */ |
| 84 | MakeJoint({{1, 0}, {7, 0}, {9, 1}}), /* joint at point (2, 0) */ |
| 85 | MakeJoint({{0, 1}, {1, 1}, {2, 0}, {3, 0}}), /* joint at point (1, 1) */ |
| 86 | MakeJoint({{2, 1}}), /* joint at point (0, 2) */ |
| 87 | MakeJoint({{3, 1}, {4, 1}, {5, 0}, {6, 0}}), /* joint at point (2, 2) */ |
| 88 | MakeJoint({{4, 0}, {8, 1}}), /* joint at point (3, 1) */ |
| 89 | MakeJoint({{5, 1}}), /* joint at point (1, 3) */ |
| 90 | MakeJoint({{6, 1}}), /* joint at point (3, 3) */ |
| 91 | MakeJoint({{7, 1}, {8, 0}}), /* joint at point (3, 0) */ |
| 92 | }; |
| 93 | |
| 94 | return BuildWorldGraph(std::move(loader), estimator, joints); |
| 95 | } |
| 96 | |
| 97 | class ApplyingTrafficTest |
| 98 | { |
no test coverage detected