local-search-0.0.3: A first attempt at generalised local search within Haskell, for applications in combinatorial optimisation.

Portabilityportable
Stabilityprovisional
MaintainerRichard Senington <sc06r2s@leeds.ac.uk>

Control.Search.Local.Tree

Description

The internal data structure of the library.

Synopsis

Documentation

data LSTree nme Source

A rose tree, but not currently using an optimised data structure, just this little home built one. The accessor functions should be easy enough to understand.

Constructors

LSTree 

Fields

treeNodeName :: nme
 
treeNodeChildren :: [LSTree nme]
 

Instances

Eq nme => Eq (LSTree nme) 
Ord nme => Ord (LSTree nme)

Making a tree part of Ord and Eq, for ease of comparison later. Note that how the order is determined depends upon the implementation given for a solution.

mkTree :: (a -> [a]) -> a -> LSTree aSource

The construction function, as seen in the paper. Takes a neighbourhood function, that is, a function that takes a solution and perterbs it in some way, giving a selection of new solutions. It then requires a seed, and gives back an initial tree.