GTALib-0.0.5: A library for GTA programming

Safe HaskellNone

GTA.Data.BinTree

Description

This module provides the GTA framework on binary (and leaf-valued) trees, such as definitions of the data structures and their algebras, generators, aggregators, etc.

Documentation

data LVTree a Source

Constructors

NodeLV (LVTree a) (LVTree a) 
LeafLV a 

Instances

data LVTreeAlgebra b a Source

Constructors

LVTreeAlgebra 

Fields

nodeLV :: a -> a -> a
 
leafLV :: b -> a
 

data LVTreeMapFs b b' Source

Constructors

LVTreeMapFs 

Fields

leafLVF :: b -> b'
 

data BinTree n l Source

Constructors

BinNode n (BinTree n l) (BinTree n l) 
BinLeaf l 

Instances

(Eq n, Eq l) => Eq (BinTree n l) 
(Ord n, Ord l) => Ord (BinTree n l) 
(Read n, Read l) => Read (BinTree n l) 
GenericSemiringStructure (BinTreeAlgebra n l) (BinTree n l) (BinTreeMapFs n l) 

data BinTreeAlgebra n l a Source

Constructors

BinTreeAlgebra 

Fields

binNode :: n -> a -> a -> a
 
binLeaf :: l -> a
 

data BinTreeMapFs n l b' Source

Constructors

BinTreeMapFs 

Fields

binNodeF :: n -> b'
 
binLeafF :: l -> b'
 

lvtrees :: [a] -> LVTreeSemiring a s -> sSource

selects :: BinTree n l -> BinTreeSemiring (Bool, n) (Bool, l) a -> aSource

assignTrans :: [b] -> [c] -> BinTreeSemiring c (b, a) s -> LVTreeSemiring a sSource

assignTrees :: [b] -> [c] -> [a] -> BinTreeSemiring c (b, a) s -> sSource