@Override
public void printInfo()
{
// vertices
for( Vertex v : vertices)
{
v.printInfo();
System.out.print(" ");
}
System.out.println();
// edges
for( ArcNode head : adjL )
{
for( ArcNode n=head; n!=null; n=n.next)
{
head.edge.printInfo();
System.out.print(" ");
}
}
System.out.println();
}
Should be:
@Override
public void printInfo()
{
// vertices
for( Vertex v : vertices)
{
v.printInfo();
System.out.print(" ");
}
System.out.println();
// edges
for( ArcNode head : adjL )
{
for( ArcNode n=head; n!=null; n=n.next)
{
n.edge.printInfo();
System.out.print(" ");
}
}
System.out.println();
}
Brian Wells