karps-0.2.0.0: Haskell bindings for Spark Dataframes and Datasets

Safe HaskellNone
LanguageHaskell2010

Spark.Core.Internal.DAGStructures

Description

Data structures to represent Directed Acyclic Graphs (DAGs).

Synopsis

Documentation

newtype VertexId Source #

The unique ID of a vertex.

Constructors

VertexId 

Instances

Eq VertexId Source # 
Ord VertexId Source # 
Show VertexId Source # 
Generic VertexId Source # 

Associated Types

type Rep VertexId :: * -> * #

Methods

from :: VertexId -> Rep VertexId x #

to :: Rep VertexId x -> VertexId #

Hashable VertexId Source # 

Methods

hashWithSalt :: Int -> VertexId -> Int #

hash :: VertexId -> Int #

type Rep VertexId Source # 
type Rep VertexId = D1 (MetaData "VertexId" "Spark.Core.Internal.DAGStructures" "karps-0.2.0.0-Ergj4tYxtT33lacYzPfeHg" True) (C1 (MetaCons "VertexId" PrefixI True) (S1 (MetaSel (Just Symbol "unVertexId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ByteString)))

data Edge e Source #

An edge in a graph, parametrized by some payload.

Constructors

Edge 

Fields

Instances

Functor Edge Source # 

Methods

fmap :: (a -> b) -> Edge a -> Edge b #

(<$) :: a -> Edge b -> Edge a #

Show e => Show (Edge e) Source # 

Methods

showsPrec :: Int -> Edge e -> ShowS #

show :: Edge e -> String #

showList :: [Edge e] -> ShowS #

data Vertex v Source #

A vertex in a graph, parametrized by some payload.

Constructors

Vertex 

Fields

Instances

Functor Vertex Source # 

Methods

fmap :: (a -> b) -> Vertex a -> Vertex b #

(<$) :: a -> Vertex b -> Vertex a #

Show v => Show (Vertex v) Source # 

Methods

showsPrec :: Int -> Vertex v -> ShowS #

show :: Vertex v -> String #

showList :: [Vertex v] -> ShowS #

data VertexEdge e v Source #

An edge, along with its end node.

Constructors

VertexEdge 

Fields

Instances

(Show v, Show e) => Show (VertexEdge e v) Source # 

Methods

showsPrec :: Int -> VertexEdge e v -> ShowS #

show :: VertexEdge e v -> String #

showList :: [VertexEdge e v] -> ShowS #

type AdjacencyMap v e = Map VertexId (Vector (VertexEdge e v)) Source #

The adjacency map of a graph.

The node Id corresponds to the start node, the pairs are the end node and and the edge to reach to the node. There may be multiple edges leading to the same node.

data Graph v e Source #

The representation of a graph.

In all the project, it is considered as a DAG.

Constructors

Graph 

Fields

Instances

(Show v, Show e) => Show (Graph v e) Source # 

Methods

showsPrec :: Int -> Graph v e -> ShowS #

show :: Graph v e -> String #

showList :: [Graph v e] -> ShowS #

class GraphVertexOperations v where Source #

Graph operations on types that are supposed to represent vertices.

Minimal complete definition

vertexToId, expandVertexAsVertices

class GraphVertexOperations v => GraphOperations v e where Source #

Graph operations on types that are supposed to represent edges.

Minimal complete definition

expandVertex

Methods

expandVertex :: v -> [(e, v)] Source #