forked from algorithm-visualizer/algorithm-visualizer
-
Notifications
You must be signed in to change notification settings - Fork 0
WeightedDirectedGraphTracer
Jason Park edited this page Jun 20, 2016
·
9 revisions
WeightedDirectedGraphTracer inherits DirectedGraphTracer.
Method | Description |
---|---|
WeightedDirectedGraphTracer((String) name) | create WeightedDirectedGraphTracer and set its name |
attach((LogTracer) logTracer) | automatically print log when visiting or leaving nodes |
palette((Object) {visited, left, selected, default}) | set colors (e.g., {visited: 'green', left: '#FFA500', default: 'rgb(255,255,255)'} ) |
_setTreeData((Number[][]) tree, (Number) root) | set tree data to visualize |
_setData((Number[][]) graph) | set graph data to visualize |
_weight((Number) target, (Number) weight) | set weight of target node |
_visit((Number) target, (Number) source, (Number) weight) | visit target node from source node and set weight of target node |
_leave((Number) target, (Number) source, (Number) weight) | leave target node to source node and set weight of target node |
_clear() | erase traces on the graph |
_wait() | wait for a certain amount of time |