downhill-0.4.0.0: Reverse mode automatic differentiation
Safe HaskellSafe-Inferred
LanguageHaskell2010

Downhill.Internal.Graph.OpenGraph

Synopsis

Documentation

data OpenEdge a v where Source #

Constructors

OpenEdge :: BackFun u v -> OpenEndpoint a u -> OpenEdge a v 

data OpenEndpoint a v where Source #

data OpenNode a v Source #

Constructors

BasicVector v => OpenNode [OpenEdge a v] 

data OpenGraph a z Source #

Computational graph under construction. Open refers to the set of the nodes – new nodes can be added to this graph. Once the graph is complete the set of nodes will be frozen and the type of the graph will become Graph (Downhill.Internal.Graph module).

Constructors

OpenGraph (OpenNode a z) (OpenMap (OpenNode a)) 

recoverSharing :: forall a z. BasicVector z => [Term a z] -> IO (OpenGraph a z) Source #

Collects duplicate nodes in Expr tree and converts it to a graph.