Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dhadka/TSPLIB4J
/ functions
Functions
163 in github.com/dhadka/TSPLIB4J
⨍
Functions
163
◇
Types & classes
36
↓ 98 callers
Method
add
Adds the specified node to this problem instance. If a node with the same identifier already exists, the previous node will be replaced. @param node
src/org/moeaframework/problem/tsplib/NodeCoordinates.java:111
↓ 33 callers
Method
get
Returns the identifier of the node visited at the specified index. Tours are cyclic, so specifying an index {@code < 0} or {@code >= size()} is cycled
src/org/moeaframework/problem/tsplib/Tour.java:92
↓ 27 callers
Method
equals
(Object obj)
src/org/moeaframework/problem/tsplib/Node.java:92
↓ 18 callers
Method
size
The number of nodes visited in this tour. @return the number of nodes visited in this tour
src/org/moeaframework/problem/tsplib/Tour.java:80
↓ 10 callers
Method
createTour
Constructs a tour from the specified array. The values in the array should start at {@code 1}. @param entries the nodes visited in the tour @return
src/org/moeaframework/problem/tsplib/Tour.java:356
↓ 9 callers
Method
createCanonicalTour
Returns the canonical tour with the given length. The canonical tour visits the nodes in order, i.e., {@code [1, 2, 3, ..., length]}. @param length
src/org/moeaframework/problem/tsplib/Tour.java:326
↓ 9 callers
Method
readNextLine
Reads the next line from the reader, parses out one or more weights, and appends the weights to the given queue. @param reader the reader containing
src/org/moeaframework/problem/tsplib/EdgeWeightMatrix.java:75
↓ 8 callers
Method
get
Returns the node with the specified identifier. @param id the identifier of the node to return @return the node with the specified identifier
src/org/moeaframework/problem/tsplib/NodeCoordinates.java:121
↓ 8 callers
Method
isEquivalent
Returns {@code true} if this tour is equivalent to the specified tour; {@code false} otherwise. Two tours are considered equivalent if they visit the
src/org/moeaframework/problem/tsplib/Tour.java:266
↓ 7 callers
Method
distance
Calculates and returns the total distance of this tour. The total distance includes the distance from the last node back to the first node in the tou
src/org/moeaframework/problem/tsplib/Tour.java:167
↓ 7 callers
Method
getTours
Returns the solutions to this problem instance. @return the solutions to this problem instance
src/org/moeaframework/problem/tsplib/TSPInstance.java:417
↓ 6 callers
Method
addTour
Adds a solution to this TSPLIB problem instance. This method does not verify that the solution has all required edges; the caller must ensure this co
src/org/moeaframework/problem/tsplib/TSPInstance.java:259
↓ 6 callers
Method
getDataType
Returns the type of this problem instance. @return the type of this problem instance
src/org/moeaframework/problem/tsplib/TSPInstance.java:298
↓ 6 callers
Method
toArray
Returns this tour as an array of integers. @return this tour as an array of integers
src/org/moeaframework/problem/tsplib/Tour.java:136
↓ 6 callers
Method
toGeographical
Converts a latitude or longitude value in the form {@code DDD.MM} to its geographical angle in radians. @param x the latitude or longitude value in t
src/org/moeaframework/problem/tsplib/GeographicalDistance.java:52
↓ 5 callers
Method
getDimension
Returns the number of nodes defined by this problem instance. @return the number of nodes defined by this problem instance
src/org/moeaframework/problem/tsplib/TSPInstance.java:316
↓ 5 callers
Method
getDistanceBetween
Returns the distance between the two specified nodes. @param id1 the identifier of the first node @param id2 the identifier of the second node @retur
src/org/moeaframework/problem/tsplib/DistanceTable.java:67
↓ 5 callers
Method
reverse
Reverses the order in which the nodes are visited between the two specified indices. The first index defines the start of the reverse operation; the
src/org/moeaframework/problem/tsplib/Tour.java:244
↓ 4 callers
Method
displayTour
Adds a tour to this graphical display. The tour will be displayed using the default color. @param tour the tour to display
src/org/moeaframework/problem/tsplib/TSPPanel.java:121
↓ 4 callers
Method
equals
(Object obj)
src/org/moeaframework/problem/tsplib/Edge.java:118
↓ 4 callers
Method
getDistanceTable
Returns the distance table that defines the nodes, edges, and weights for this problem instance. @return the distance table that defines the nodes, e
src/org/moeaframework/problem/tsplib/TSPInstance.java:386
↓ 4 callers
Method
getId
Returns the identifier of this node. @return the identifier of this node
src/org/moeaframework/problem/tsplib/Node.java:57
↓ 4 callers
Method
getOppositeEndpoint
Returns the opposite endpoint of this edge. @param id the identifier of the one endpoint @return the opposite endpoint of this edge @throws IllegalAr
src/org/moeaframework/problem/tsplib/Edge.java:88
↓ 4 callers
Method
hasEndpoint
Returns {@code true} if either endpoint of this edge is the specified node; {@code false} otherwise. @param id the identifier of the node @return {@c
src/org/moeaframework/problem/tsplib/Edge.java:76
↓ 4 callers
Method
hashCode
()
src/org/moeaframework/problem/tsplib/Edge.java:99
↓ 4 callers
Method
toDisplayCoordinates
Converts the node coordinates into display coordinates on the screen. If this problem uses geographical weights, then the latitude/longitude coordinat
src/org/moeaframework/problem/tsplib/TSPPanel.java:231
↓ 3 callers
Method
apply
Applies the 2-opt heuristic to the specified tour. @param tour the tour that is modified by the 2-opt heuristic
src/org/moeaframework/problem/tsplib/TSP2OptHeuristic.java:52
↓ 3 callers
Method
getLength
Returns the length (dimension) of the coordinates. @return the length (dimension) of the coordinates
src/org/moeaframework/problem/tsplib/NodeCoordType.java:62
↓ 3 callers
Method
getPosition
Returns the position of this node. @return the position of this node
src/org/moeaframework/problem/tsplib/Node.java:66
↓ 3 callers
Method
toTour
Converts a MOEA Framework solution to a {@link Tour}. @param solution the MOEA Framework solution @return the tour defined by the solution
src/org/moeaframework/problem/tsplib/TSPExample.java:64
↓ 2 callers
Method
addEdge
Adds an edge to this graph. @param id1 the identifier of the first node @param id2 the identifier of the second node @throws IllegalArgumentException
src/org/moeaframework/problem/tsplib/EdgeData.java:147
↓ 2 callers
Method
clear
Removes all nodes from this problem instance.
src/org/moeaframework/problem/tsplib/NodeCoordinates.java:138
↓ 2 callers
Method
fromArray
Sets this tour equal to the specified array. @param array the array of integers defining a tour
src/org/moeaframework/problem/tsplib/Tour.java:151
↓ 2 callers
Method
getDisplayDataType
Returns the way graphical displays of the data should be generated. @return the way graphical displays of the data should be generated
src/org/moeaframework/problem/tsplib/TSPInstance.java:375
↓ 2 callers
Method
getName
Returns the name of this problem instance. @return the name of this problem instance
src/org/moeaframework/problem/tsplib/TSPInstance.java:289
↓ 2 callers
Method
getNodeCoordType
()
src/org/moeaframework/problem/tsplib/EdgeWeightType.java:117
↓ 2 callers
Method
isNeighbor
Returns {@code true} if the specified nodes are neighbors; {@code false} otherwise. @param id1 the identifier of the first node @param id2 the identi
src/org/moeaframework/problem/tsplib/DistanceTable.java:87
↓ 2 callers
Method
load
Loads a problem instance from the specified TSPLIB file. @param file the TSPLIB file defining the problem @throws IOException if an I/O error occurre
src/org/moeaframework/problem/tsplib/TSPInstance.java:143
↓ 2 callers
Method
readNextLine
Reads the next line of adjacent edges, adding the parsed values to the queue. @param reader the reader containing the adjacent edge data @param entri
src/org/moeaframework/problem/tsplib/EdgeData.java:74
↓ 2 callers
Method
save
Saves the string to a temporary file. @param string the contents of the temporary file @return the temporary file containing the specified string con
test/org/moeaframework/problem/tsplib/TSP2OptHeuristicTest.java:44
↓ 2 callers
Method
set
Sets the identifier of the node visited at the specified index. Tours are cyclic, so setting an index {@code < 0} or {@code >= size()} is cycled thro
src/org/moeaframework/problem/tsplib/Tour.java:108
↓ 2 callers
Method
size
Returns the number of nodes that this instance contains. @return the number of nodes that this instance contains
src/org/moeaframework/problem/tsplib/NodeCoordinates.java:147
↓ 1 callers
Method
clearTours
Removes all tours shown in this display.
src/org/moeaframework/problem/tsplib/TSPPanel.java:168
↓ 1 callers
Method
containsFixedEdges
Returns {@code true} if this tour contains all the fixed edges required by the TSPLIB problem instances; {@code false} otherwise. @param problem the
src/org/moeaframework/problem/tsplib/Tour.java:186
↓ 1 callers
Method
createRandomTour
Returns a random tour with the given length. A random tour will visit every node exactly once. @param length the number of nodes in the resulting to
src/org/moeaframework/problem/tsplib/Tour.java:343
↓ 1 callers
Method
fromTour
Saves a {@link Tour} into a MOEA Framework solution. @param solution the MOEA Framework solution @param tour the tour
src/org/moeaframework/problem/tsplib/TSPExample.java:82
↓ 1 callers
Method
getDisplayData
Returns the data used to graphically display the nodes; or {@code null} if the display data is not explicitly defined. @return the data used to graph
src/org/moeaframework/problem/tsplib/TSPInstance.java:397
↓ 1 callers
Method
getDistanceFunction
()
src/org/moeaframework/problem/tsplib/EdgeWeightType.java:94
↓ 1 callers
Method
getEdgeWeightType
Returns the way edge weights are specified. @return the way edge weights are specified
src/org/moeaframework/problem/tsplib/TSPInstance.java:335
↓ 1 callers
Method
getEdges
Returns the edges contained in this graph. Changes to the returned list will be reflected in this graph. @return the edges contained in this graph
src/org/moeaframework/problem/tsplib/EdgeData.java:167
↓ 1 callers
Method
getFixedEdges
Returns the edges that are required in each solution to this problem instance. @return the edges that are required in each solution to this problem i
src/org/moeaframework/problem/tsplib/TSPInstance.java:408
↓ 1 callers
Method
getNeighborsOf
Returns the identifiers of all neighbors of the specified node. A neighbor must have a direct edge between itself and the specified node. @param id
src/org/moeaframework/problem/tsplib/DistanceTable.java:56
↓ 1 callers
Method
getPaint
Returns the paint/color used when rendering the tour. @return the paint/color used when rendering the tour
src/org/moeaframework/problem/tsplib/TSPPanel.java:407
↓ 1 callers
Method
getStroke
Returns the line stroke used when rendering the tour. @return the line stroke used when rendering the tour
src/org/moeaframework/problem/tsplib/TSPPanel.java:416
↓ 1 callers
Method
isHamiltonianCycle
Returns {@code true} if this tour is a Hamiltonian cycle; {@code false} otherwise. A Hamiltonian cycle is a path through a graph that visits every no
src/org/moeaframework/problem/tsplib/Tour.java:205
↓ 1 callers
Method
listNodes
Returns the identifiers of all nodes in this distance table. @return the identifiers of all nodes in this distance table
src/org/moeaframework/problem/tsplib/DistanceTable.java:44
↓ 1 callers
Method
load
Loads the contents of this tour from the given reader. @param reader the reader that defines this tour @throws IOException if an I/O error occurred w
src/org/moeaframework/problem/tsplib/Tour.java:57
↓ 1 callers
Method
loadDemands
Loads the demands from the specified reader. @param reader the reader containing the demands @throws IOException if an I/O error occurred while readi
src/org/moeaframework/problem/tsplib/VehicleRoutingTable.java:70
↓ 1 callers
Method
loadDepots
Loads the depot list from the given reader. @param reader the reader that defines the depot nodes @throws IOException if an I/O error occurred while
src/org/moeaframework/problem/tsplib/VehicleRoutingTable.java:88
↓ 1 callers
Method
remove
Removes the node with the specified identifier from this problem instance. @param id the identifier of the node to remove
src/org/moeaframework/problem/tsplib/NodeCoordinates.java:131
↓ 1 callers
Method
setAutoRepaint
Set to {@code true} if this graphical display should automatically repaint when the displayed tours are changed; {@code false} otherwise. When {@code
src/org/moeaframework/problem/tsplib/TSPPanel.java:111
↓ 1 callers
Method
toEdges
Returns the edges belonging to this tour. @return the edges belonging to this tour
src/org/moeaframework/problem/tsplib/Tour.java:121
↓ 1 callers
Method
toString
()
src/org/moeaframework/problem/tsplib/Node.java:70
Method
CeilingDistance
Constructs a new Euclidean distance function with distances rounded up to the nearest integer.
src/org/moeaframework/problem/tsplib/CeilingDistance.java:33
Method
DistanceFunction
Constructs a new distance function.
src/org/moeaframework/problem/tsplib/DistanceFunction.java:33
Method
DistanceTable
Constructs a new distance table instance.
src/org/moeaframework/problem/tsplib/DistanceTable.java:35
Method
Edge
Constructs an edge between two nodes. @param id1 the identifier of the first node @param id2 the identifier of the second node
src/org/moeaframework/problem/tsplib/Edge.java:44
Method
EdgeData
Constructs a new, empty graph with no edges. @param size the number of nodes represented in this graph @param format the format of the edge data sect
src/org/moeaframework/problem/tsplib/EdgeData.java:57
Method
EdgeWeightMatrix
Constructs a new, empty edge weight matrix. @param size the number of nodes represented in this edge weight matrix @param format the format of this e
src/org/moeaframework/problem/tsplib/EdgeWeightMatrix.java:58
Method
EuclideanDistance
Constructs a new Euclidean distance function.
src/org/moeaframework/problem/tsplib/EuclideanDistance.java:31
Method
GeographicalDistance
Constructs a new geographical distance function.
src/org/moeaframework/problem/tsplib/GeographicalDistance.java:41
Method
ManhattanDistance
Constructs a new Manhattan distance function.
src/org/moeaframework/problem/tsplib/ManhattanDistance.java:31
Method
MaximumDistance
Constructs a new maximum distance function.
src/org/moeaframework/problem/tsplib/MaximumDistance.java:31
Method
Node
Constructs a new node with the specified identifier and position. @param id the identifier of this node @param position the position of this node
src/org/moeaframework/problem/tsplib/Node.java:46
Method
NodeCoordType
Constructs a new node coordinate enumeration. @param length the length (dimension) of the coordinates
src/org/moeaframework/problem/tsplib/NodeCoordType.java:53
Method
NodeCoordinates
Constructs a new, empty node coordinates instance. @param size the number of nodes to load into this problem instance @param edgeWeightType the edge
src/org/moeaframework/problem/tsplib/NodeCoordinates.java:61
Method
PseudoEuclideanDistance
Constructs a new pseudo-Euclidean distance function.
src/org/moeaframework/problem/tsplib/PseudoEuclideanDistance.java:32
Method
TSP2OptHeuristic
Constructs a new 2-opt heuristic for the specified traveling salesman problem instance. @param instance the traveling salesman problem instance
src/org/moeaframework/problem/tsplib/TSP2OptHeuristic.java:42
Method
TSPInstance
Constructs a new, empty TSPLIB problem instance.
src/org/moeaframework/problem/tsplib/TSPInstance.java:118
Method
TSPPanel
Constructs a new panel for displaying a TSPLIB problem instance. @param problem the TSPLIB problem instance
src/org/moeaframework/problem/tsplib/TSPPanel.java:82
Method
TSPProblem
Constructs a new optimization problem for the given TSP problem instance. @param instance the TSP problem instance
src/org/moeaframework/problem/tsplib/TSPExample.java:116
Method
Tour
Constructs a new, empty tour.
src/org/moeaframework/problem/tsplib/Tour.java:45
Method
TourDisplaySetting
Constructs a new, default tour display setting.
src/org/moeaframework/problem/tsplib/TSPPanel.java:376
Method
VehicleRoutingTable
Constructs a new, empty vehicle routing table. @param size the number of nodes the the problem instance
src/org/moeaframework/problem/tsplib/VehicleRoutingTable.java:56
Method
distance
{@inheritDoc} @throws IllegalArgumentException if the nodes are not two dimensional
src/org/moeaframework/problem/tsplib/GeographicalDistance.java:63
Method
distance
(int length, double[] position1, double[] position2)
src/org/moeaframework/problem/tsplib/ManhattanDistance.java:35
Method
distance
{@inheritDoc} @throws IllegalArgumentException if the nodes are not two dimensional
src/org/moeaframework/problem/tsplib/PseudoEuclideanDistance.java:41
Method
distance
Computes and returns the distance (or edge weight) between the two specified nodes. @param node1 the first node @param node2 the second node @return
src/org/moeaframework/problem/tsplib/DistanceFunction.java:46
Method
distance
(int length, double[] position1, double[] position2)
src/org/moeaframework/problem/tsplib/EuclideanDistance.java:35
Method
distance
(int length, double[] position1, double[] position2)
src/org/moeaframework/problem/tsplib/MaximumDistance.java:35
Method
distance
(int length, double[] position1, double[] position2)
src/org/moeaframework/problem/tsplib/CeilingDistance.java:37
Method
evaluate
(Solution solution)
src/org/moeaframework/problem/tsplib/TSPExample.java:123
Method
freeInstances
()
test/org/moeaframework/problem/tsplib/TestTSP.java:156
Method
freeInstances
()
test/org/moeaframework/problem/tsplib/TestSOP.java:88
Method
freeInstances
()
test/org/moeaframework/problem/tsplib/TestATSP.java:65
Method
freeInstances
()
test/org/moeaframework/problem/tsplib/TestHCP.java:54
Method
freeInstances
()
test/org/moeaframework/problem/tsplib/TestVRP.java:62
Method
getCapacity
Returns the truck capacity in CVRP problem instances. The return value is undefined if the data type is not {@code CVRP}. @return the truck capacity
src/org/moeaframework/problem/tsplib/TSPInstance.java:326
Method
getComment
Returns any comments about this problem instance. @return any comments about this problem instance
src/org/moeaframework/problem/tsplib/TSPInstance.java:307
Method
getDemand
Returns the demand at the specified node. @param id the identifier of the node @return the demand at the specified node @throws IllegalArgumentExcept
src/org/moeaframework/problem/tsplib/VehicleRoutingTable.java:114
next →
1–100 of 163, ranked by callers