Module
Transit.Data.Graph
- Package
- purescript-transit
- Repository
- m-bock/purescript-transit
General purpose graph data structure for representing directed graphs with labeled edges.
This module provides a simple graph representation where:
- Edges are labeled (each edge has an associated label value)
- Nodes are values themselves
- Supports directed edges, cycles, and multiple edges between nodes
#Edge Source
type Edge edgeLabel node = { edgeLabel :: edgeLabel, fromNode :: node, toNode :: node }An edge in the graph connecting two nodes with a label.
edgeLabel: The type of edge labelsnode: The type of node values
#Graph Source
newtype Graph edgeLabel nodeA directed graph that supports cycles and multiple edges.
Supports:
- Directed edges (fromNode -> toNode)
- Cycles (paths that return to a node, possibly through intermediate nodes)
- Multiple edges (same nodes can be connected by different edges)
Instances
#isUndirected Source
isUndirected :: forall edgeLabel node. Ord node => Ord edgeLabel => Graph edgeLabel node -> BooleanChecks if the graph is undirected (all edges have symmetric counterparts).
A graph is considered undirected if for every edge from A to B, there exists an edge from B to A with the same edge label.
- Modules
- Transit
- Transit.
Class. CheckReturn - Transit.
Class. CurryN - Transit.
Class. MkHandlerLookup - Transit.
Class. MkUpdate - Transit.
Core - Transit.
DSL - Transit.
Data. DotLang - Transit.
Data. Graph - Transit.
Data. Html - Transit.
Data. MaybeChurch - Transit.
Data. Table - Transit.
HandlerLookup - Transit.
Render. Graphviz - Transit.
Render. Theme - Transit.
Render. TransitionTable - Transit.
StateGraph - Transit.
VariantUtils