public class LMApproximator extends Object implements WeightApproximator
| Constructor and Description |
|---|
LMApproximator(Graph graph,
Weighting lmWeighting,
Weighting routingWeighting,
int maxBaseNodes,
LandmarkStorage lms,
int activeCount,
double factor,
boolean reverse) |
| Modifier and Type | Method and Description |
|---|---|
double |
approximate(int v) |
static LMApproximator |
forLandmarks(Graph g,
Weighting weighting,
LandmarkStorage lms,
int activeLM) |
double |
getSlack() |
WeightApproximator |
reverse()
Makes a 'reverse' copy of itself to make it possible using the two objects independent e.g.
|
LMApproximator |
setEpsilon(double epsilon)
Increase approximation with higher epsilon
|
void |
setTo(int t) |
String |
toString() |
void |
triggerActiveLandmarkRecalculation()
This method forces a lazy recalculation of the active landmark set e.g.
|
public LMApproximator(Graph graph, Weighting lmWeighting, Weighting routingWeighting, int maxBaseNodes, LandmarkStorage lms, int activeCount, double factor, boolean reverse)
public static LMApproximator forLandmarks(Graph g, Weighting weighting, LandmarkStorage lms, int activeLM)
weighting - the weighting used for the current path calculation, not necessarily the same that we used for the LM preparation.
All edge weights must be larger or equal compared to those used for the preparation.public LMApproximator setEpsilon(double epsilon)
public double approximate(int v)
approximate in interface WeightApproximatorpublic void setTo(int t)
setTo in interface WeightApproximatorpublic WeightApproximator reverse()
WeightApproximatorreverse in interface WeightApproximatorpublic double getSlack()
getSlack in interface WeightApproximatorpublic void triggerActiveLandmarkRecalculation()
Copyright © 2012–2023. All rights reserved.