Skip navigation links

Oracle® Spatial Java API Reference
11g Release 2 (11.2)
E11829-02


oracle.spatial.network.lod
Class TspNearestNeighbor

java.lang.Object
  extended by 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 Class Summary

 

Nested classes/interfaces inherited from interface oracle.spatial.network.lod.TSP
TSP.TourFlag

 

Constructor Summary
TspNearestNeighbor(NetworkExplorer ne, LinkCostCalculator[] lccs, NodeCostCalculator[] nccs, ShortestPath spAlgorithm)
           

 

Method Summary
 Matrix<LogicalSubPath> shortestPaths(PointOnNet[][] startPoints, PointOnNet[][] endPoints, LODNetworkConstraint constraint, TSP.TourFlag tourFlag)
           
 TspPath tspPath(PointOnNet[][] points, TSP.TourFlag tourFlag, int linkLevel, LODNetworkConstraint constraint)
          Returns the traveling salesman tour with the optimal or suboptimal cost.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

TspNearestNeighbor

public TspNearestNeighbor(NetworkExplorer ne,
                          LinkCostCalculator[] lccs,
                          NodeCostCalculator[] nccs,
                          ShortestPath spAlgorithm)

Method Detail

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

Oracle® Spatial Java API Reference
11g Release 2 (11.2)
E11829-02


Copyright © 2007, 2011, Oracle and/or its affiliates. All Rights Reserved.