diff options
author | Udo Klein <git@blinkenlight.net> | 2016-01-08 20:32:37 +0000 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-01-08 20:32:37 +0000 |
commit | 8c70cb4c62a353bea99f37965dfc829c4accc391 (patch) | |
tree | f543de50cc16d8e93e2df531beb6f5cd286f5273 /examples/src | |
parent | 00d9261724feb48d358679efbae6889833e893e0 (diff) | |
download | spark-8c70cb4c62a353bea99f37965dfc829c4accc391.tar.gz spark-8c70cb4c62a353bea99f37965dfc829c4accc391.tar.bz2 spark-8c70cb4c62a353bea99f37965dfc829c4accc391.zip |
fixed numVertices in transitive closure example
Author: Udo Klein <git@blinkenlight.net>
Closes #10642 from udoklein/patch-2.
Diffstat (limited to 'examples/src')
-rwxr-xr-x | examples/src/main/python/transitive_closure.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/src/main/python/transitive_closure.py b/examples/src/main/python/transitive_closure.py index 7bf5fb6ddf..3d61250d8b 100755 --- a/examples/src/main/python/transitive_closure.py +++ b/examples/src/main/python/transitive_closure.py @@ -30,8 +30,8 @@ rand = Random(42) def generateGraph(): edges = set() while len(edges) < numEdges: - src = rand.randrange(0, numEdges) - dst = rand.randrange(0, numEdges) + src = rand.randrange(0, numVertices) + dst = rand.randrange(0, numVertices) if src != dst: edges.add((src, dst)) return edges |