Created
March 7, 2015 12:30
-
-
Save vasia/ad68268118b6f895cf7c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void testFullyConnectedUndirected() throws Exception { | |
final String testEdges = "1 2\n" + "2 1\n" + | |
"1 3\n" + "3 1\n" + | |
"1 4\n" + "4 1\n" + | |
"2 3\n" + "3 2\n" + | |
"2 4\n" + "4 2\n" + | |
"3 4\n" + "4 3\n"; | |
String edgesPath = createTempFile(testEdges); | |
LocalClusteringCoefficientExample.main(new String[] {edgesPath, resultPath}); | |
expectedResult = "1,1\n" + | |
"2,1\n" + | |
"3,1\n" + | |
"4,1\n"; | |
} | |
@Test | |
public void testFullyConnectedDirected() throws Exception { | |
/* | |
* Test Local Clustering Coefficient on the default data | |
*/ | |
final String testEdges = "1 2\n" + | |
"1 3\n" + | |
"1 4\n" + | |
"2 3\n" + | |
"2 4\n" + | |
"3 4\n" ; | |
String edgesPath = createTempFile(testEdges); | |
LocalClusteringCoefficientExample.main(new String[] {edgesPath, resultPath}); | |
expectedResult = "1,0.5\n" + | |
"2,0.5\n" + | |
"3,0.5\n" + | |
"4,0.5\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment