Module Control.Search.SearchTree.Traversal

Implements additional traversals on search trees.

Author: Sebastian Fischer <sebf@informatik.uni-kiel.de>

Version: January 2024

Summary of exported operations:

depthDiag :: SearchTree a -> [a]  Deterministic 
diagonalized depth first search.
rndDepthDiag :: Int -> SearchTree a -> [a]  Deterministic 
randomized variant of diagonalized depth first search.
levelDiag :: SearchTree a -> [a]  Deterministic 
diagonalization of devels.
rndLevelDiag :: Int -> SearchTree a -> [a]  Deterministic 
randomized diagonalization of levels.
rndLevelDiagFlat :: Int -> Int -> SearchTree a -> [a]  Deterministic 
randomized diagonalization of levels with flattening.

Exported operations:

depthDiag :: SearchTree a -> [a]  Deterministic 

diagonalized depth first search.

Example call:
(depthDiag t)
Parameters:
  • t : search tree
Returns:
enumeration of values in given search tree

rndDepthDiag :: Int -> SearchTree a -> [a]  Deterministic 

randomized variant of diagonalized depth first search.

Example call:
(rndDepthDiag t)
Parameters:
  • t : search tree
Returns:
enumeration of values in given search tree

levelDiag :: SearchTree a -> [a]  Deterministic 

diagonalization of devels.

Example call:
(levelDiag t)
Parameters:
  • t : search tree
Returns:
enumeration of values in given search tree

rndLevelDiag :: Int -> SearchTree a -> [a]  Deterministic 

randomized diagonalization of levels.

Example call:
(rndLevelDiag t)
Parameters:
  • t : search tree
Returns:
enumeration of values in given search tree

rndLevelDiagFlat :: Int -> Int -> SearchTree a -> [a]  Deterministic 

randomized diagonalization of levels with flattening.