Skip navigation links
oracle.spatial.network.lod
Class TspNearestNeighbor
java.lang.Object
oracle.spatial.network.lod.TspNearestNeighbor
- All Implemented Interfaces:
- TSP
-
public class TspNearestNeighbor
- extends java.lang.Object
- implements TSP
This is a simple heuristic TSP algorithm, which always picks the closes point as the next one to visit.
- Since:
- Oracle Database 11g Release 2 (11.2)
| Nested classes/interfaces inherited from interface oracle.spatial.network.lod.TSP |
TSP.TourFlag |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TspNearestNeighbor
public TspNearestNeighbor(NetworkExplorer ne,
LinkCostCalculator[] lccs,
NodeCostCalculator[] nccs,
ShortestPath spAlgorithm)
tspPath
public TspPath tspPath(PointOnNet[][] points,
TSP.TourFlag tourFlag,
int linkLevel,
LODNetworkConstraint constraint)
throws LODNetworkException
- Description copied from interface:
TSP
- Returns the traveling salesman tour with the optimal or suboptimal cost.
-
- Specified by:
tspPath in interface TSP
-
- Parameters:
points - points to visit on the TSP tour.
tourFlag - a flag indicating whether the tour should be open or closed, and if the tour is open, whether the tour should have fixed start or end point.
linkLevel - link level
constraint - network constraint
- Throws:
LODNetworkException
shortestPaths
public Matrix<LogicalSubPath> shortestPaths(PointOnNet[][] startPoints,
PointOnNet[][] endPoints,
LODNetworkConstraint constraint,
TSP.TourFlag tourFlag)
throws LODNetworkException
-
- Throws:
LODNetworkException
Skip navigation links
Copyright © 2007, 2011, Oracle and/or its affiliates. All Rights Reserved.