parallel-tree-search-0.2: Parallel Tree Search

Portabilityportable
Stabilityexperimental
MaintainerSebastian Fischer (sebf@informatik.uni-kiel.de)

Control.Concurrent.ParallelTreeSearch

Description

This Haskell library provides an implementation of parallel search based on the search tree provided by the package tree-monad.

Synopsis

Documentation

class SearchQueue q whereSource

Search queues store multiple search trees.

Methods

emptyQ :: q aSource

Constructs an empty search queue.

addQ :: SearchTree a -> q a -> q aSource

Adds a search tree to asearch queue.

viewQ :: q a -> SearchView q aSource

creates a view on a search queue for pattern matching.

data SearchView q a Source

A SearchView is used for pattern matching a search queue.

Constructors

EmptyQ 
(SearchTree a) :~ (q a) 

newtype LIFO a Source

LIFO search queues can be used to implement parallel depth-first search.

Constructors

LIFO [SearchTree a] 

Instances

newtype FIFO a Source

FIFO search queues can be used to implement parallel breadth-first search.

Constructors

FIFO (Seq (SearchTree a)) 

Instances

parallelTreeSearchSource

Arguments

:: SearchQueue q 
=> Int

thread limit

-> Int

work limit

-> q a

queue with search trees

-> IO [a] 

This function enumerates the results stored in the queue of SearchTrees in parallel. It is parameterised by the maximum number of threads to use and the maximum amount of work to perform by each thread before communicating the results.