Constructor and Description |
---|
HighwayAnalyser(int evaluateTags) |
Modifier and Type | Method and Description |
---|---|
int |
compare(double value,
double bestValue) |
double |
distance(Segment s1,
Segment s2)
The geometric distance between two segments (DISTANZ).
|
double |
evaluateLeft(Segment part1,
Segment part2) |
double |
evaluateRight(Segment part1,
Segment part2) |
boolean |
shouldEvaluate(Segment part1,
Segment part2) |
double |
worstResult() |
public boolean shouldEvaluate(Segment part1, Segment part2)
shouldEvaluate
in interface Analyser
public double distance(Segment s1, Segment s2)
This implementation calculates the sum of the distance of the two start points and the two endpoints. If the segments are not aligned the same way, one of them is reversed for this calculation.
distance
in interface Analyser
s1
and s2
NullPointerException
- if s1
or s2
are
null
public double evaluateLeft(Segment part1, Segment part2)
evaluateLeft
in interface Analyser
public double evaluateRight(Segment part1, Segment part2)
evaluateRight
in interface Analyser
public int compare(double value, double bestValue)
public double worstResult()
worstResult
in interface Analyser