Portability | portable |
---|---|
Stability | experimental |
Maintainer | gnn.github@gmail.com |
The network created by the GSOM algorithm is layed out in two dimensions. Thus one needs to assign two dimensional coordinates to the nodes of the network and for a clustering to the clusters.
The types defining these coordinates and the functions to handle them belong into this module.
- type Coordinates = (Int, Int)
- type Direction = Int
- type Directions = [Int]
- directions :: Directions
- neighbour :: Coordinates -> Direction -> Coordinates
- neighbourCoordinates :: Coordinates -> [Coordinates]
Documentation
type Coordinates = (Int, Int)Source
type Directions = [Int]Source
directions :: DirectionsSource
The list of supported directions. Since we are only dealing with hexagonal lattices, there are only six possible directions.
neighbour :: Coordinates -> Direction -> CoordinatesSource
calculates the coordinates of
the neighbour of node with location neighbour
location directionlocation
in direction
direction
.
neighbourCoordinates :: Coordinates -> [Coordinates]Source
calculates the list of
coordinates which are directly adjacent to neighbourCoordinates
pointpoint
.