Graphs0Test.cm
Last edited by: Christian Jacobi, September 30, 1986 2:08:43 pm PDT
Graphs0
TerminalIO
run Graphs0Test
← TerminalIO.WriteRope["==\n"]
← &g ← Graphs0.Create[$somegraph];
← &n0 ← Graphs0.AddNewNode[&g, $n0];
← &n1 ← Graphs0.AddNewNode[&g, $n1];
← &n2 ← Graphs0.AddNewNode[&g, $n2];
← &n3 ← Graphs0.AddNewNode[&g, $n3];
← &n4 ← Graphs0.AddNewNode[&g, $n4];
← &n5 ← Graphs0.AddNewNode[&g, $n5];
← &n6 ← Graphs0.AddNewNode[&g, $n6];
← &n7 ← Graphs0.AddNewNode[&g, $n7];
← &n8 ← Graphs0.AddNewNode[&g, $n8];
← &n9 ← Graphs0.AddNewNode[&g, $n9];
← &n10 ← Graphs0.AddNewNode[&g, $n10];
← &n11 ← Graphs0.AddNewNode[&g, $n11];
← &a12 ← Graphs0.AddNewArc[&g, $a12, &n1, &n2];
← &a23 ← Graphs0.AddNewArc[&g, $a23, &n2, &n3];
← &a34 ← Graphs0.AddNewArc[&g, $a34, &n3, &n4];
← &a45 ← Graphs0.AddNewArc[&g, $a45, &n4, &n5];
← &a56 ← Graphs0.AddNewArc[&g, $a56, &n5, &n6];
← &a36 ← Graphs0.AddNewArc[&g, $a36, &n3, &n6];
← &a78 ← Graphs0.AddNewArc[&g, $a78, &n7, &n8];
← &a1011 ← Graphs0.AddNewArc[&g, $a1011, &n10, &n11];
← &a811 ← Graphs0.AddNewArc[&g, $a811, &n8, &n11];
← &a102 ← Graphs0.AddNewArc[&g, $a811, &n10, &n2];
← &a1110 ← Graphs0.AddNewArc[&g, $a1110, &n11, &n0];
← &a02 ← Graphs0.AddNewArc[&g, $a02, &n0, &n2];
← &a96 ← Graphs0.AddNewArc[&g, $a96, &n9, &n6];
← &a94 ← Graphs0.AddNewArc[&g, $a94, &n9, &n4];
← Graphs0.EnumArcs[&g, Graphs0Test.DeliverArc, NIL]
← TerminalIO.WriteRope["**\n"]
← Graphs0Test.g ← &g;
← Graphs0Test.nodeSetList ← LIST[LIST[&n1], LIST[&n6]];
← Graphs0Test.nodeSetList ← LIST[LIST[&n1], LIST[&n6], LIST[&n4]];
← Graphs0Test.nodeSetList ← LIST[LIST[&n1], LIST[&n6], LIST[&n8]];
← Graphs0Test.TestPath[];
← Graphs0Test.random ← TRUE
← Graphs0.RandomShuffle[&g];