flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject [3/4] flink git commit: [hotfix] [gelly] Flip ordering of TriangleListing bitmask
Date Thu, 10 Nov 2016 17:14:12 GMT
[hotfix] [gelly] Flip ordering of TriangleListing bitmask

Encode directed triangle bitmask using forward=10 and reverse=01 as done
by Batagelj and Mrvar in their Triadic Census table.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/ed09dba2
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/ed09dba2
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/ed09dba2

Branch: refs/heads/master
Commit: ed09dba25a31adea3392c9a6a61d0d915b5430c7
Parents: 2d325b3
Author: Greg Hogan <code@greghogan.com>
Authored: Mon Oct 31 10:25:53 2016 -0400
Committer: Greg Hogan <code@greghogan.com>
Committed: Thu Nov 10 10:02:06 2016 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/flink/graph/EdgeOrder.java        | 5 +++--
 .../graph/library/clustering/directed/TriangleListingTest.java | 6 +++---
 2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/ed09dba2/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/EdgeOrder.java
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/EdgeOrder.java
b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/EdgeOrder.java
index 08e955a..8226b04 100644
--- a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/EdgeOrder.java
+++ b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/EdgeOrder.java
@@ -24,8 +24,9 @@ package org.apache.flink.graph;
  */
 public enum EdgeOrder {
 
-	FORWARD(0b01),
-	REVERSE(0b10),
+	// bitmasks from triadic census
+	FORWARD(0b10),
+	REVERSE(0b01),
 	MUTUAL(0b11);
 
 	private final byte bitmask;

http://git-wip-us.apache.org/repos/asf/flink/blob/ed09dba2/flink-libraries/flink-gelly/src/test/java/org/apache/flink/graph/library/clustering/directed/TriangleListingTest.java
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly/src/test/java/org/apache/flink/graph/library/clustering/directed/TriangleListingTest.java
b/flink-libraries/flink-gelly/src/test/java/org/apache/flink/graph/library/clustering/directed/TriangleListingTest.java
index 55570c6..3c86358 100644
--- a/flink-libraries/flink-gelly/src/test/java/org/apache/flink/graph/library/clustering/directed/TriangleListingTest.java
+++ b/flink-libraries/flink-gelly/src/test/java/org/apache/flink/graph/library/clustering/directed/TriangleListingTest.java
@@ -45,8 +45,8 @@ extends AsmTestBase {
 				.setSortTriangleVertices(true));
 
 		String expectedResult =
-			"(0,1,2,22)\n" +
-			"(1,2,3,41)";
+			"(0,1,2,41)\n" +
+			"(1,2,3,22)";
 
 		TestBaseUtils.compareResultAsText(tl.collect(), expectedResult);
 	}
@@ -79,6 +79,6 @@ extends AsmTestBase {
 		ChecksumHashCode checksum = DataSetUtils.checksumHashCode(tl);
 
 		assertEquals(75049, checksum.getCount());
-		assertEquals(0x00000033111f1054L, checksum.getChecksum());
+		assertEquals(0x00000033111f11baL, checksum.getChecksum());
 	}
 }


Mime
View raw message