Graph

Type

Interface

Compare

Base.inMethod
in(edge::Edge, graph::DAG)

Check whether the edge is part of the graph.

source
Base.inMethod
in(node::Node, graph::DAG)

Check whether the node is part of the graph.

source

Mute

ComputableDAGs._insert_edge!Function
_insert_edge!(graph::DAG, node1::Node, node2::Node, index::Int=0; track = true, invalidate_cache = true)

Insert the edge between node1 (child) and node2 (parent) into the graph. An optional integer index can be given. The arguments of the function call that this node compiles to will then be ordered by these indices.

Warning

For creating new graphs, use the public version insert_edge! instead which uses the defaults false for the keywords.

Keyword Arguments

  • track::Bool: Whether to add the changes to the DAG's Diff. Should be set false in parsing or graph creation functions for performance.
  • invalidate_cache::Bool: Whether to invalidate caches associated with the changes. Should also be turned off for graph creation or parsing.

See also: _insert_node!, _remove_node!, _remove_edge!

source
ComputableDAGs._insert_node!Method
_insert_node!(graph::DAG, node::Node; track = true, invalidate_cache = true)

Insert the node into the graph.

Warning

For creating new graphs, use the public version insert_node! instead which uses the defaults false for the keywords.

Keyword Arguments

track::Bool: Whether to add the changes to the DAG's Diff. Should be set false in parsing or graph creation functions for performance.

invalidate_cache::Bool: Whether to invalidate caches associated with the changes. Should also be turned off for graph creation or parsing.

See also: _remove_node!, _insert_edge!, _remove_edge!

source
ComputableDAGs._remove_edge!Method
_remove_edge!(graph::DAG, node1::Node, node2::Node; track = true, invalidate_cache = true)

Remove the edge between node1 (child) and node2 (parent) into the graph. Returns the integer index of the removed edge.

Keyword Arguments

  • track::Bool: Whether to add the changes to the DAG's Diff. Should be set false in parsing or graph creation functions for performance.
  • invalidate_cache::Bool: Whether to invalidate caches associated with the changes. Should also be turned off for graph creation or parsing.

See also: _insert_node!, _remove_node!, _insert_edge!

source
ComputableDAGs._remove_node!Method
_remove_node!(graph::DAG, node::Node; track = true, invalidate_cache = true)

Remove the node from the graph.

Keyword Arguments

track::Bool: Whether to add the changes to the DAG's Diff. Should be set false in parsing or graph creation functions for performance.

invalidate_cache::Bool: Whether to invalidate caches associated with the changes. Should also be turned off for graph creation or parsing.

See also: _insert_node!, _insert_edge!, _remove_edge!

source
ComputableDAGs.insert_edge!Function
insert_edge!(graph::DAG, node1::Node, node2::Node)

Insert the edge between node1 (child) and node2 (parent) into the graph.

source
ComputableDAGs.insert_node!Method
insert_node!(graph::DAG, node::Node)
insert_node!(graph::DAG, task::AbstractTask, name::String="")

Insert the node into the graph or alternatively construct a node from the given task and insert it.

source
ComputableDAGs.invalidate_caches!Method
invalidate_caches!(graph::DAG, operation::NodeReduction)

Invalidate the operation caches for a given NodeReduction.

This deletes the operation from the graph's possible operations and from the involved nodes' own operation caches.

source
ComputableDAGs.invalidate_caches!Method
invalidate_caches!(graph::DAG, operation::NodeSplit)

Invalidate the operation caches for a given NodeSplit.

This deletes the operation from the graph's possible operations and from the involved nodes' own operation caches.

source

Print

Base.showMethod
show(io::IO, graph::DAG)

Print the given graph to io. If there are too many nodes it will print only a summary of them.

source
ComputableDAGs.show_nodesMethod
show_nodes(io::IO, graph::DAG)

Print a graph's nodes. Should only be used for small graphs as it prints every node in a list.

source

Properties

ComputableDAGs.get_exit_nodeMethod
get_exit_node(graph::DAG)

Return the graph's exit node. This assumes the graph only has a single exit node. If the graph has multiple exit nodes, the one encountered first will be returned.

source

Validate

ComputableDAGs.is_validMethod
is_valid(graph::DAG)

Validate the entire graph using asserts. Intended for testing with @assert is_valid(graph).

source