congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
com.graphhopper.routing.ch
Code IndexAdd Tabnine to your IDE (free)

How to use com.graphhopper.routing.ch

Best Java code snippets using com.graphhopper.routing.ch (Showing top 20 results out of 315)

origin: graphhopper/graphhopper

NodeBasedNodeContractor(CHGraph prepareGraph, Weighting weighting, PMap pMap) {
  super(prepareGraph, weighting);
  this.prepareWeighting = new PreparationWeighting(weighting);
  extractParams(pMap);
}
origin: graphhopper/graphhopper

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);
}
origin: graphhopper/graphhopper

private CalcShortcutsResult calcShortcutCount(int node) {
  findShortcuts(calcScHandler.setNode(node));
  return calcScHandler.calcShortcutsResult;
}
origin: graphhopper/graphhopper

protected void runGraphContraction() {
  if (!prepareNodes())
    return;
  contractNodes();
}
origin: graphhopper/graphhopper

public final boolean isDisablingAllowed() {
  return disablingAllowed || !isEnabled();
}
origin: graphhopper/graphhopper

private Params(int periodicUpdatesPercentage, int lastNodesLazyUpdatePercentage, int neighborUpdatePercentage,
        int nodesContractedPercentage, int logMessagesPercentage) {
  setPeriodicUpdatesPercentage(periodicUpdatesPercentage);
  setLastNodesLazyUpdatePercentage(lastNodesLazyUpdatePercentage);
  setNeighborUpdatePercentage(neighborUpdatePercentage);
  setNodesContractedPercentage(nodesContractedPercentage);
  setLogMessagesPercentage(logMessagesPercentage);
}
origin: graphhopper/graphhopper

private NodeContractor createNodeContractor() {
  NodeContractor nodeContractor = new NodeBasedNodeContractor(lg, weighting, new PMap());
  nodeContractor.initFromGraph();
  nodeContractor.prepareContraction();
  return nodeContractor;
}
origin: graphhopper/graphhopper

@Override
protected final void processEdge(int edgeId, int endNode, int prevEdgeId) {
  // Shortcuts do only contain valid weight so first expand before adding
  // to distance and time
  expandEdge(getEdge(edgeId, endNode), false);
}
origin: graphhopper/graphhopper

  @Override
  public String toString() {
    String str;
    if (flags == PrepareEncoder.getScDirMask())
      str = from + "<->";
    else
      str = from + "->";
    return str + to + ", weight:" + weight + " (" + skippedEdge1 + "," + skippedEdge2 + ")";
  }
}
origin: graphhopper/graphhopper

  @Override
  public String toString() {
    return getName();
  }
}
origin: graphhopper/graphhopper

@Override
public void contractNode(int node) {
  shortcuts.clear();
  long degree = findShortcuts(addScHandler.setNode(node));
  addedShortcutsCount += addShortcuts(shortcuts.keySet());
  // put weight factor on meanDegree instead of taking the average => meanDegree is more stable
  meanDegree = (meanDegree * 2 + degree) / 3;
}
origin: graphhopper/graphhopper

void setLastNodesLazyUpdatePercentage(int lastNodesLazyUpdatePercentage) {
  checkPercentage(LAST_LAZY_NODES_UPDATES, lastNodesLazyUpdatePercentage);
  this.lastNodesLazyUpdatePercentage = lastNodesLazyUpdatePercentage;
}
origin: graphhopper/graphhopper

private void close() {
  nodeContractor.close();
  sortedNodes = null;
  oldPriorities = null;
}
origin: graphhopper/graphhopper

public long getDijkstraCount() {
  return nodeContractor.getDijkstraCount();
}
origin: graphhopper/graphhopper

private float calculatePriority(int node) {
  return nodeContractor.calculatePriority(node);
}
origin: graphhopper/graphhopper

public final boolean isCHEnabled() {
  return chFactoryDecorator.isEnabled();
}
origin: graphhopper/graphhopper

void setLogMessagesPercentage(int logMessagesPercentage) {
  checkPercentage(LOG_MESSAGES, logMessagesPercentage);
  this.logMessagesPercentage = logMessagesPercentage;
}
origin: graphhopper/graphhopper

void setPeriodicUpdatesPercentage(int periodicUpdatesPercentage) {
  checkPercentage(PERIODIC_UPDATES, periodicUpdatesPercentage);
  this.periodicUpdatesPercentage = periodicUpdatesPercentage;
}
origin: graphhopper/graphhopper

void setNodesContractedPercentage(int nodesContractedPercentage) {
  checkPercentage(CONTRACTED_NODES, nodesContractedPercentage);
  this.nodesContractedPercentage = nodesContractedPercentage;
}
origin: graphhopper/graphhopper

void setNeighborUpdatePercentage(int neighborUpdatePercentage) {
  checkPercentage(NEIGHBOR_UPDATES, neighborUpdatePercentage);
  this.neighborUpdatePercentage = neighborUpdatePercentage;
}
com.graphhopper.routing.ch

Most used classes

  • CHAlgoFactoryDecorator
    This class implements the CH decorator for the routing algorithm factory and provides several helper
  • PreparationWeighting
    Used in CH preparation and therefor assumed that all edges are of type CHEdgeIteratorState
  • PrepareContractionHierarchies
    This class prepares the graph for a bidirectional algorithm supporting contraction hierarchies ie. a
  • PrepareEncoder
    The flags are stored differently for shortcuts: just one weight and the two direction bits which is
  • Path4CH
    Recursivly unpack shortcuts.
  • NodeContractor,
  • PrepareContractionHierarchies$AddShortcutHandler,
  • PrepareContractionHierarchies$CalcShortcutHandler,
  • PrepareContractionHierarchies$IgnoreNodeFilter,
  • PrepareContractionHierarchies$Shortcut,
  • PrepareContractionHierarchies$ShortcutHandler,
  • AbstractNodeContractor,
  • NodeBasedNodeContractor$AddShortcutHandler,
  • NodeBasedNodeContractor$CalcShortcutHandler,
  • NodeBasedNodeContractor$Shortcut,
  • NodeBasedNodeContractor$ShortcutHandler,
  • NodeBasedNodeContractorTest$Shortcut,
  • NodeBasedNodeContractorTest,
  • PrepareContractionHierarchies$2
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now