Graph
Type
ComputableDAGs.DAG — Type
DAGThe representation of the graph as a set of Nodes.
Operations can be applied on it using push_operation! and reverted using pop_operation! like a stack. To get the set of possible operations, use operations. The members of the object should not be manually accessed, instead always use the provided interface functions.
ComputableDAGs.DAG — Method
ComputableDAGs.PossibleOperations — Type
PossibleOperationsA struct storing all possible operations on a DAG. To get the PossibleOperations on a DAG, use operations.
ComputableDAGs.PossibleOperations — Method
Interface
ComputableDAGs.can_pop — Method
ComputableDAGs.pop_operation! — Method
pop_operation!(dag::DAG)Revert the latest applied operation on the graph.
See also: DAG, push_operation!
ComputableDAGs.push_operation! — Method
push_operation!(dag::DAG, operation::Operation)Apply a new operation to the graph.
See also: DAG, pop_operation!
ComputableDAGs.reset_graph! — Method
Compare
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.
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 theDAG'sDiff. Should be setfalsein 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!
ComputableDAGs._insert_node! — Method
_insert_node!(dag::DAG, node::Node; track = true, invalidate_cache = true)Insert the node into the graph.
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!
ComputableDAGs._remove_edge! — Method
_remove_edge!(dag::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 theDAG'sDiff. Should be setfalsein 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!
ComputableDAGs._remove_node! — Method
_remove_node!(dag::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!
ComputableDAGs.insert_edge! — Function
insert_edge!(dag::DAG, node1::Node, node2::Node)Insert the edge between node1 (child) and node2 (parent) into the graph.
sourceComputableDAGs.insert_node! — Method
insert_node!(dag::DAG, node::Node)
insert_node!(dag::DAG, task::AbstractTask, name::String="")Insert the node into the graph or alternatively construct a node from the given task and insert it.
sourceComputableDAGs.snapshot_diff — Method
snapshot_diff(dag::DAG)Return the graph's Diff since last time this function was called. Then, clear the current diff.
See also: revert_diff!, AppliedOperation and revert_operation!
ComputableDAGs.show_nodes — Method
show_nodes(io::IO, dag::DAG)Print a graph's nodes. Should only be used for small graphs as it prints every node in a list.
sourceProperties
ComputableDAGs.entry_nodes — Method
ComputableDAGs.exit_node — Method
exit_node(dag::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