Constructor
new TravellingSalesmanGenerator(params)
Class constructor
Parameters:
Name | Type | Description |
---|---|---|
params |
object | parameters of the generated instance |
Methods
_hamiltonianPath() → {string}
Generate array for Hamiltonian type of Travelling Salesman problem
Returns:
empty string, because all nodes are visited
- Type
- string
_shortestPath() → {string}
Generate array for shortest type of Travelling Salesman problem
Returns:
nodes to visit
- Type
- string
generate() → {String}
Generate instance based on parameters
Returns:
instance of travelling salesman problem coded as String
- Type
- String