11 "aud.util.GraphDemo");
13 static class MyGraph
extends GraphAM<SimpleNode,SimpleEdge> {
25 super(
"aud.util.GraphDemo");
34 public static void main(String args[]) {
36 MyGraph
g=
new MyGraph();
49 System.out.println(
"n0="+n0);
50 System.out.println(
"n1="+n1);
51 System.out.println(
"n2="+n2);
52 System.out.println(
"e0="+e0);
53 System.out.println(
"e1="+e1);
54 System.out.println(
"e2="+e2);
55 System.out.println(
"e3="+e3);
GraphvizDecorator getDecorator()
get decoration or null
abstract Edge addEdge(Node source, Node destination)
Create and add new edge from source to destination.
abstract Node addNode()
create and add new node
Graph implementation based on adjacency matrix.
void setLabel(String label)
set label (default label if label==null)
void setLabel(String label)
set label (default label if label==null)
Simple viewer for Graphvizable.
static DotViewer displayWindow(Graphvizable object, String caption)
create new DotViewer (toplevel window) and display object
void display(String code)
display dot code
Demonstrate visualization of graph algorithms.
static void main(String args[])
Decorator for items of Graphvizable objects.
Example for a simple decorator.
void highlightEdge(GraphvizDecorable object)
Set highlighted edge.
void markEdge(GraphvizDecorable object)
void markNode(GraphvizDecorable object)
void unmarkNode(GraphvizDecorable object)
unmark node object
void highlightNode(GraphvizDecorable object)
Set highlighted node.
Simple framework for single stepping code.
SingleStepper whereAmI()
print location of calling code
SingleStepper showSource()
jmp to caller's location in editor (emacs only)
void halt(String text, int timeout)
display text and wait for user or timeout
Graph data structures and algorithms.
AuD lecture: Data structures, algorithms, examples.