Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- areAdjacent :: EdgeList e -> Int -> Int -> Bool
- getEnds :: GraphEdge e -> [Int]
- getOtherEnd :: GraphEdge e -> Int -> Int
- getSharedVertex :: GraphEdge e1 -> GraphEdge e2 -> Maybe Int
- getVertexAdjacent :: EdgeList e -> Int -> [Int]
- getVertexIncident :: EdgeList e -> Int -> EdgeList e
- getVertexIncidentIdx :: EdgeList e -> Int -> [Int]
- haveSharedVertex :: GraphEdge e1 -> GraphEdge e2 -> Bool
- isIncident :: GraphEdge e -> Int -> Bool
- (~=) :: GraphEdge e1 -> GraphEdge e2 -> Bool
- (/~=) :: GraphEdge e1 -> GraphEdge e2 -> Bool
- matchEdges :: EdgeList e -> [(Int, Int)] -> EdgeList e
- getEdgeIncident :: Ord e => EdgeList e -> Int -> EdgeList e
- doubleEdgeList :: EdgeList e -> EdgeList e
- edgeListToMap :: EdgeList e -> Map Int [Int]
- haveSharedEdge :: Eq e => EdgeList e -> EdgeList e -> Bool
- sortBondList :: Ord e => EdgeList e -> EdgeList e
- getIndices :: EdgeList e -> [Int]
Vertex Functions
areAdjacent :: EdgeList e -> Int -> Int -> Bool Source #
Checks whether two vertices with given indices are adjacent in given EdgeList
.
getEnds :: GraphEdge e -> [Int] Source #
Retrieves indices of vertices that are being connected by given GraphEdge
.
getOtherEnd :: GraphEdge e -> Int -> Int Source #
Returns index of vertex incident to given GraphEdge
and different from passed index.
getSharedVertex :: GraphEdge e1 -> GraphEdge e2 -> Maybe Int Source #
Gets shared common vertex of two edges. If edges don't have common vertex, returns Nothing.
getVertexAdjacent :: EdgeList e -> Int -> [Int] Source #
Finds in given EdgeList
all indices of vertices adjacent to given vertex.
getVertexIncident :: EdgeList e -> Int -> EdgeList e Source #
Find all edges in given EdgeList
that are incident to vertex with given index.
getVertexIncidentIdx :: EdgeList e -> Int -> [Int] Source #
Returns indices of edges in EdgeList
that are incident to vertex with given index.
haveSharedVertex :: GraphEdge e1 -> GraphEdge e2 -> Bool Source #
Checks that two edges have common vertex.
isIncident :: GraphEdge e -> Int -> Bool Source #
Checks that vertex with given index is incident to GraphEdge
.
Edge Functions
matchEdges :: EdgeList e -> [(Int, Int)] -> EdgeList e Source #
Find edges in EdgeList
which ordered pairs of indices, that they are connecting,
are present in passed list of ordered pairs.
getEdgeIncident :: Ord e => EdgeList e -> Int -> EdgeList e Source #
Find all edges that are incident to edge in EdgeList
with given index.
EdgeList Functions
doubleEdgeList :: EdgeList e -> EdgeList e Source #
For every edge in EdgeList
add to that list an edge in opposite direction.
haveSharedEdge :: Eq e => EdgeList e -> EdgeList e -> Bool Source #
Checks that two EdgeList
s have common edge.