Finish 3 ^ F5 | 2 ↖ ↗ ↖ F2 F3 F4 ↖ ↗ ↖ 1 ↗ ↖ F0 F1 ↗ ↖ 0 0 1 2 3 Start Note. This graph contains of 6 one segment directed features.
| 42 | // Start |
| 43 | // Note. This graph contains of 6 one segment directed features. |
| 44 | unique_ptr<SingleVehicleWorldGraph> BuildXYGraph() |
| 45 | { |
| 46 | unique_ptr<TestGeometryLoader> loader = make_unique<TestGeometryLoader>(); |
| 47 | loader->AddRoad(0 /* featureId */, true /* oneWay */, 1.0 /* speed */, |
| 48 | RoadGeometry::Points({{0.0, 0.0}, {1.0, 1.0}})); |
| 49 | loader->AddRoad(1 /* featureId */, true /* oneWay */, 1.0 /* speed */, |
| 50 | RoadGeometry::Points({{2.0, 0.0}, {1.0, 1.0}})); |
| 51 | loader->AddRoad(2 /* featureId */, true /* oneWay */, 1.0 /* speed */, |
| 52 | RoadGeometry::Points({{1.0, 1.0}, {0.0, 2.0}})); |
| 53 | loader->AddRoad(3 /* featureId */, true /* oneWay */, 1.0 /* speed */, |
| 54 | RoadGeometry::Points({{1.0, 1.0}, {2.0, 2.0}})); |
| 55 | loader->AddRoad(4 /* featureId */, true /* oneWay */, 1.0 /* speed */, |
| 56 | RoadGeometry::Points({{3.0, 1.0}, {2.0, 2.0}})); |
| 57 | loader->AddRoad(5 /* featureId */, true /* oneWay */, 1.0 /* speed */, |
| 58 | RoadGeometry::Points({{2.0, 2.0}, {2.0, 3.0}})); |
| 59 | |
| 60 | vector<Joint> const joints = { |
| 61 | MakeJoint({{0 /* feature id */, 0 /* point id */}}), /* joint at point (0, 0) */ |
| 62 | MakeJoint({{1, 0}}), /* joint at point (2, 0) */ |
| 63 | MakeJoint({{0, 1}, {1, 1}, {2, 0}, {3, 0}}), /* joint at point (1, 1) */ |
| 64 | MakeJoint({{2, 1}}), /* joint at point (0, 2) */ |
| 65 | MakeJoint({{3, 1}, {4, 1}, {5, 0}}), /* joint at point (2, 2) */ |
| 66 | MakeJoint({{4, 0}}), /* joint at point (3, 1) */ |
| 67 | MakeJoint({{5, 1}}), /* joint at point (2, 3) */ |
| 68 | }; |
| 69 | |
| 70 | traffic::TrafficCache const trafficCache; |
| 71 | shared_ptr<EdgeEstimator> estimator = CreateEstimatorForCar(trafficCache); |
| 72 | return BuildWorldGraph(std::move(loader), estimator, joints); |
| 73 | } |
| 74 | |
| 75 | using Algorithm = AStarAlgorithm<Segment, SegmentEdge, RouteWeight>; |
| 76 |
no test coverage detected