Copyright | (C) 2024 Tillmann Vogt |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Tillmann Vogt <tillk.vogt@gmail.com> |
Stability | provisional |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
TreeEditDistance
Description
Synopsis
- editDistance :: AGraph -> AGraph -> Int
- zhangShasha :: AGraph -> AGraph -> Int
- addPostOrderIndexing :: Word32 -> (Word32, AGraph) -> (Word32, AGraph)
- addLeftMosts :: Word32 -> (Word32, AGraph) -> (Word32, AGraph)
- leftMostNodes :: Word32 -> AGraph -> [Word32]
- keyRoots :: [Word32] -> [Word32]
- dEdge :: EdgeLabel
- extractNodes :: [(Word32, [Word32], e)] -> Map Word32 Label
- fromAdj :: Map Word32 nl -> [(Word32, [Word32], EdgeLabel)] -> Graph nl EdgeLabel
- show' :: Array (Word32, Word32) Int -> String
- partIsomorphic :: (Word32, AGraph) -> (Word32, AGraph) -> ([(Word32, Word32)], [(Word32, Word32)])
- graphsAreIsomorphic :: (AGraph, AGraph) -> (Word32, Word32) -> Bool
- type AGraph = Graph Label EdgeLabel
- data Label = Label String Word32 Word32
- data EdgeLabel = EdgeLabel String
- class EdgeAttribute el
Documentation
editDistance :: AGraph -> AGraph -> Int Source #
If there is a faster/better algorithm, it will be put here
extractNodes :: [(Word32, [Word32], e)] -> Map Word32 Label Source #
Extract nodes from both starting node and adjacent nodes
partIsomorphic :: (Word32, AGraph) -> (Word32, AGraph) -> ([(Word32, Word32)], [(Word32, Word32)]) Source #
class EdgeAttribute el #
Convert a complex edge label to an attribute with 8 bits How to do this depends on which edges have to be filtered fast
Minimal complete definition