from jhplot import *
from java.net import *
import sys
g=HGraph().buildDirectedGraph()
amazon =URL("http://www.amazon")
yahoo = URL("http://www.yahoo")
ebay = URL("http://www.ebay")
# add the vertices
g.addVertex(amazon)
g.addVertex(yahoo)
g.addVertex(ebay)
# add edges to create linking structure
g.addEdge(yahoo, amazon)
g.addEdge(yahoo, ebay)
# pring graph
print g
HGraph().showGraph(g) # visualize graph
# sys.exit()
Ads help maintain this website.