28 |
# settings for random graph |
# settings for random graph |
29 |
RANDOM_MAX_NODES = 10 |
RANDOM_MAX_NODES = 10 |
30 |
RANDOM_MAX_CHILDREN_PER_NODE = 5 |
RANDOM_MAX_CHILDREN_PER_NODE = 5 |
31 |
RANDOM_MAX_NODES = 10000 |
#RANDOM_MAX_NODES = 1000 |
32 |
RANDOM_MAX_CHILDREN_PER_NODE = 10 |
#RANDOM_MAX_CHILDREN_PER_NODE = 10 |
33 |
|
|
34 |
|
|
35 |
def operateOnFixedGraph(): |
def operateOnFixedGraph(): |
95 |
|
|
96 |
# 1. calculate paths |
# 1. calculate paths |
97 |
print '-' * 42 |
print '-' * 42 |
98 |
print " Finding paths from node %s to %s" % (source_node.id, target_node.id) |
print " Finding paths from %s to %s (depth=%s)" % (source_node.id, target_node.id, MAX_SEARCH_DEPTH) |
99 |
print '-' * 42 |
print '-' * 42 |
100 |
paths = graph.computePaths(source_node, target_node, MAX_SEARCH_DEPTH) |
paths = graph.computePaths(source_node, target_node, MAX_SEARCH_DEPTH) |
101 |
|
|