You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2017/09/22 14:50:01 UTC
[04/11] tinkerpop git commit: updated toString() for
PageRankVertexProgram>
updated toString() for PageRankVertexProgram>
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/735af789
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/735af789
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/735af789
Branch: refs/heads/master
Commit: 735af789d127bb172df40fd3c4b806cd635bbd31
Parents: 3bc830f
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Wed Sep 20 08:25:55 2017 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Wed Sep 20 08:25:55 2017 -0600
----------------------------------------------------------------------
.../process/computer/ranking/pagerank/PageRankVertexProgram.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/735af789/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/ranking/pagerank/PageRankVertexProgram.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/ranking/pagerank/PageRankVertexProgram.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/ranking/pagerank/PageRankVertexProgram.java
index 81468d4..28f3e4b 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/ranking/pagerank/PageRankVertexProgram.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/ranking/pagerank/PageRankVertexProgram.java
@@ -215,7 +215,9 @@ public class PageRankVertexProgram implements VertexProgram<Double> {
@Override
public String toString() {
- return StringFactory.vertexProgramString(this, "alpha=" + this.alpha + ", iterations=" + this.totalIterations + ", epsilon=" + this.epsilon);
+ return -1 == this.totalIterations ?
+ StringFactory.vertexProgramString(this, "alpha=" + this.alpha + ", epsilon=" + this.epsilon) :
+ StringFactory.vertexProgramString(this, "alpha=" + this.alpha + ", iterations=" + this.totalIterations);
}
//////////////////////////////