NodeBasedNodeContractor(CHGraph prepareGraph, Weighting weighting, PMap pMap) { super(prepareGraph, weighting); this.prepareWeighting = new PreparationWeighting(weighting); extractParams(pMap); }
public PrepareContractionHierarchies(CHGraph chGraph, Weighting weighting, TraversalMode traversalMode) { this.prepareGraph = chGraph; this.traversalMode = traversalMode; this.weighting = weighting; prepareWeighting = new PreparationWeighting(weighting); this.params = Params.forTraversalMode(traversalMode); }
@Override public RoutingAlgorithm createAlgo(Graph g, AlgorithmOptions opts) { // doable but ugly Weighting w = ((PrepareContractionHierarchies) tmpFactory).getWeighting(); return new TmpAlgo(g, new PreparationWeighting(w), TraversalMode.NODE_BASED, mg). setEdgeFilter(new LevelEdgeFilter((CHGraph) routingGraph)); } };
NodeBasedNodeContractor(Directory dir, GraphHopperStorage ghStorage, CHGraph prepareGraph, Weighting weighting, PMap pMap) { super(dir, ghStorage, prepareGraph, weighting); this.prepareWeighting = new PreparationWeighting(weighting); extractParams(pMap); }
public PrepareContractionHierarchies(Directory dir, GraphHopperStorage ghStorage, CHGraph chGraph, TraversalMode traversalMode) { this.dir = dir; this.ghStorage = ghStorage; this.prepareGraph = (CHGraphImpl) chGraph; this.traversalMode = traversalMode; this.weighting = ((CHGraphImpl) chGraph).getWeighting(); prepareWeighting = new PreparationWeighting(weighting); this.params = Params.forTraversalMode(traversalMode); }
public PrepareContractionHierarchies(Directory dir, GraphHopperStorage ghStorage, CHGraph chGraph, Weighting weighting, TraversalMode traversalMode) { this.ghStorage = ghStorage; this.prepareGraph = (CHGraphImpl) chGraph; this.traversalMode = traversalMode; levelFilter = new LevelEdgeFilter(prepareGraph); prepareWeighting = new PreparationWeighting(weighting); originalEdges = dir.find("original_edges_" + AbstractWeighting.weightingToFileName(weighting)); originalEdges.create(1000); }
public PrepareContractionHierarchies( Directory dir, GraphHopperStorage ghStorage, CHGraph chGraph, FlagEncoder encoder, Weighting weighting, TraversalMode traversalMode ) { this.ghStorage = ghStorage; this.prepareGraph = (CHGraphImpl) chGraph; this.traversalMode = traversalMode; this.prepareFlagEncoder = encoder; levelFilter = new LevelEdgeFilter(prepareGraph); prepareWeighting = new PreparationWeighting(weighting); originalEdges = dir.find("original_edges_" + AbstractWeighting.weightingToFileName(weighting)); originalEdges.create(1000); }
/** * * @param graphFolder * @param memoryMapped * @param hopper * @param ownsHopper * Whether this class owns the graphhopper graph (and wrapper object) and should dispose of it later. * @param namedFlagEncoder */ private CHMatrixGeneration( GraphHopper hopper, boolean ownsHopper, String namedFlagEncoder) { this.hopper = hopper; this.ownsHopper = ownsHopper; encodingManager = hopper.getEncodingManager(); flagEncoder = identifyFlagEncoder(hopper, namedFlagEncoder); edgeFilter = new DefaultEdgeFilter(flagEncoder); WeightingMap weightingMap = new WeightingMap("fastest"); // Weighting weighting = hopper.createWeighting(weightingMap, flagEncoder); // prepareWeighting = new PreparationWeighting(weighting); // get correct weighting for flag encoder Weighting weighting = hopper.getWeightingForCH(weightingMap, flagEncoder); prepareWeighting = new PreparationWeighting(weighting); // save reference to the correct CH graph chGraph = hopper.getGraphHopperStorage().getGraph(CHGraph.class,weighting); // and create a level edge filter to ensure we (a) accept virtual (snap-to) edges and (b) don't descend into the // base graph levelEdgeFilter = new LevelEdgeFilter(chGraph); }
router = new DijkstraBidirectionCH(queryGraph, new PreparationWeighting(weighting), TraversalMode.NODE_BASED) { @Override protected void initCollections(int size) {
router = new DijkstraBidirectionCH(queryGraph, new PreparationWeighting(weighting), TraversalMode.NODE_BASED) { @Override protected void initCollections(int size) {