math-grads-0.1.6.7: Library containing graph data structures and graph algorithms

Safe HaskellNone
LanguageHaskell2010

Math.Grads.Algo.Paths

Description

Module that provides functions for different kinds of path-finding in graph.

Synopsis

Documentation

allPathsInGraph :: Ord e => GenericGraph v e -> Int -> [EdgeList e] Source #

Calculates all branched paths in graph up to the given length.

allPathsFromVertex :: Ord e => GenericGraph v e -> Int -> Int -> [Int] -> [EdgeList e] Source #

Calculates all branched paths up to the given length from given vertex in graph considering indices of vertices that shouldn't be visited during path-finding.

dfsAllPaths :: EdgeList e -> Int -> Int -> [EdgeList e] Source #

Finds all paths between vertices with given indices in EdgeList.

dfsSearch :: EdgeList e -> Int -> Int -> Maybe (EdgeList e, [Int]) Source #

Finds path between two vertices in graph represented as EdgeList. Graph shouldn't have any cycles. Hmmm, what's the difference between this function and DFS or BFS?..

findBeginnings :: EdgeList e -> [Int] Source #

Finds all vertices in EdgeList that have only one neighbour.