MCPcopy Create free account
hub / github.com/comaps/comaps / Create

Method Create

libs/routing/edge_estimator.cpp:817–832  ·  view source on GitHub ↗

EdgeEstimator ----------------------------------------------------------------------------------- static

Source from the content-addressed store, hash-verified

815// EdgeEstimator -----------------------------------------------------------------------------------
816// static
817shared_ptr<EdgeEstimator> EdgeEstimator::Create(VehicleType vehicleType, double maxWeighSpeedKMpH,
818 SpeedKMpH const & offroadSpeedKMpH,
819 shared_ptr<TrafficStash> trafficStash, DataSource * dataSourcePtr,
820 std::shared_ptr<NumMwmIds> numMwmIds)
821{
822 switch (vehicleType)
823 {
824 case VehicleType::Pedestrian:
825 case VehicleType::Transit: return make_shared<PedestrianEstimator>(maxWeighSpeedKMpH, offroadSpeedKMpH);
826 case VehicleType::Bicycle: return make_shared<BicycleEstimator>(maxWeighSpeedKMpH, offroadSpeedKMpH);
827 case VehicleType::Car:
828 return make_shared<CarEstimator>(dataSourcePtr, numMwmIds, trafficStash, maxWeighSpeedKMpH, offroadSpeedKMpH);
829 case VehicleType::Count: CHECK(false, ("Can't create EdgeEstimator for", vehicleType)); return nullptr;
830 }
831 UNREACHABLE();
832}
833
834// static
835shared_ptr<EdgeEstimator> EdgeEstimator::Create(VehicleType vehicleType, VehicleModelInterface const & vehicleModel,

Callers

nothing calls this directly

Calls 2

CreateFunction · 0.85
GetMaxWeightSpeedMethod · 0.45

Tested by

no test coverage detected