the dimension (number of nodes) for each stage
the maximum number of input colors for an internal node
the maximum number of output colors for an internal node
the minimum number of child colors allowed in the color hierarchy
the maximum number of child colors allowed in the color hierarchy
the maximum depth of the color hierarchy tree
the seed for the various random number generators
Animate the color DAG.
For each node in the DAG, check that (1) all of its "inputs" are color/type compatible with an output from a node from the previous stage, and (2) at least one of its "outputs" is color/type compatible with an input to a node from the next stage.
For each node in the DAG, check that (1) all of its "inputs" are color/type compatible with an output from a node from the previous stage, and (2) at least one of its "outputs" is color/type compatible with an input to a node from the next stage. Nodes that fails to have all of their inputs satified (check number 1) are thrown out before check if they have at least one useful output. Nodes failing check number 2 will also be thrown out.
Connect all the nodes that are going to be "used" in the DAG by creating an edge between two nodes in adjacent stages that are color/type compatible.
Connect all the nodes that are going to be "used" in the DAG by creating an edge between two nodes in adjacent stages that are color/type compatible. Also add these edges to the DAG's list of edges.
Show the flaw by printing the error message.
Show the flaw by printing the error message.
the method where the error occurred
the error message
Generate all the unique nodes that will exist in the DAG and assign colors/types to their inputs and outputs.
Generate and return a unique color for either a node's inputs or outputs.
Generate and return a unique color for either a node's inputs or outputs.
the array of existing colors
Populate the in and out ListBuffers for each node based on the DAG's list of edges.
Print the ColorTree used by the DAG for node and edge colors/type and animate its construction.
Print the in (for inputs) and out (for outputs) colors for each node in the DAG.
Print the nodes and edges in the color DAG.
Print the in (for inputs) and out (for outputs) node list buffers for each used node in the DAG.
The
ColorDAG
class provides a data structure Directed Acyclic Graphs (DAGs) with colored nodes. The ColorDAG consists of source nodes (in-degree is 0), sink nodes (out-degree is 0) and internal nodes. The edges connecting nodes must have color compatibility. The ColorDAG is divided into 'k' stages: e.g., sources (stage 0), internals (stages 1..k-2) and sinks (stage k-1).