Copyright | 2014 Tomáš Musil |
---|---|
License | BSD-3 |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
TSP
Description
Traveling Salesman Problem.
- type Size = Int
- type Vertex = Int
- type Path = [Vertex]
- type Distance = Double
- type Coordinate = Double
- type Score = Double
- type CArray = UArray Vertex Coordinate
- type DArray = UArray (Vertex, Vertex) Distance
- type FDist = (Vertex, Vertex) -> Distance
- data TSPFile
- readProblemMatrix :: TSPFile -> IO (Size, DArray)
- readProblemFunction :: TSPFile -> IO (Size, FDist)
- neighbours :: FDist -> Size -> (Score, Path) -> Rand StdGen (Score, Path)
- score :: FDist -> Path -> Score
Types
type Coordinate = Double Source
Array types
type CArray = UArray Vertex Coordinate Source