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 == n| Constructor 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 origFirst,
int origLast) |
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 origFirst,
int origLast)
origFirst - The first original edge that is skipped by this shortcut. For example for the following shortcut
edge from x to y, which itself skips the shortcuts x->v and v->y the first original edge would
be x->u: x->u->v->w->yorigLast - like origFirst, but the last orig edge, i.e w->y in above examplepublic void replaceSkippedEdges(IntUnaryOperator mapping)
Copyright © 2012–2021. All rights reserved.