public class CHStorageBuilder extends Object
CHStorage
, i.e. makes sure that
- a valid level is already set for nodeA/B when adding a shortcut nodeA-nodeB
- level(nodeB) > level(nodeA) for all added shortcuts, unless nodeA == nodeB, then level(nodeA) == level(nodeB)
- shortcuts are added such that they are sorted by level(nodeA)
- the 'last shortcut' for node n points to the last shortcut for which nodeA == nConstructor and Description |
---|
CHStorageBuilder(CHStorage chStorage) |
Modifier and Type | Method and Description |
---|---|
int |
addShortcutEdgeBased(int a,
int b,
int accessFlags,
double weight,
int skippedEdge1,
int skippedEdge2,
int origKeyFirst,
int origKeyLast) |
int |
addShortcutNodeBased(int a,
int b,
int accessFlags,
double weight,
int skippedEdge1,
int skippedEdge2) |
void |
replaceSkippedEdges(IntUnaryOperator mapping) |
void |
setIdentityLevels() |
void |
setLevel(int node,
int level) |
void |
setLevelForAllNodes(int level) |
public CHStorageBuilder(CHStorage chStorage)
public void setLevel(int node, int level)
public void setLevelForAllNodes(int level)
public void setIdentityLevels()
public int addShortcutNodeBased(int a, int b, int accessFlags, double weight, int skippedEdge1, int skippedEdge2)
public int addShortcutEdgeBased(int a, int b, int accessFlags, double weight, int skippedEdge1, int skippedEdge2, int origKeyFirst, int origKeyLast)
origKeyFirst
- The first original edge key that is skipped by this shortcut *in the direction of the shortcut*.
This definition assumes that edge-based shortcuts are one-directional, and they are.
For example for the following shortcut edge from x to y: x->u->v->w->y ,
which skips the shortcuts x->v and v->y the first original edge key would be the one of the edge x->uorigKeyLast
- like origKeyFirst, but the last orig edge key, i.e. the key of w->y in above examplepublic void replaceSkippedEdges(IntUnaryOperator mapping)
Copyright © 2012–2022. All rights reserved.