DAG
Directed Acyclic Graph with labeled nodes. This structure is a very thin wrapper around SimpleDiGraph from LightGraphs package.
Dagitty.DAG — TypeDAGStructure with fields:
graph::SimpleDiGraph- underlying directed graphlabels::Vector{Symbol}- vector of each nodes' label
Could be constructed by passing list of Pair{Symbol, Symbol}
Examples
julia> using Dagitty
julia> g = DAG(:A => :B)
DAG: {2, 1} directed simple Int64 graph with labels [:A, :B])
julia> g.graph
{2, 1} directed simple Int64 graph
julia> g.labels
2-element Vector{Symbol}:
:A
:B
julia> g = DAG(:A => :A)
ERROR: DAGHasLoops()Dagitty.DAGEdge — TypeDAGEdgePair of symbols representing DAG edge.
Dagitty.DAGHasLoops — TypeDAGHasLoopsException, thrown when loops are detected on DAG construction.
Examples
julia> using Dagitty
julia> g = DAG(:A => :B, :B => :A)
ERROR: DAGHasLoops()Dagitty.LabelNotFound — TypeLabelNotFoundException thrown on attempt to resolve label which is not present in the DAG.
Examples
```jldoctest julia> using Dagitty
julia> g = DAG(:A => :B) DAG: {2, 1} directed simple Int64 graph with labels [:A, :B])
julia> node(g, :C)