Skip to content
This repository was archived by the owner on Apr 22, 2020. It is now read-only.

Commit 1c8baa1

Browse files
committed
write proc test
1 parent e87dd8c commit 1c8baa1

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

algo/src/main/java/org/neo4j/graphalgo/impl/results/PartitionedDoubleArrayResult.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public void export(String propertyName, Exporter exporter, Function<Double, Doub
3131
export(propertyName, exporter);
3232
}
3333

34-
3534
@Override
3635
public double computeMax() {
3736
return NormalizationComputations.max(partitions);

tests/src/test/java/org/neo4j/graphalgo/algo/EigenvectorCentralityProcNormalizationIntegrationTest.java

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,6 @@ public void l2Norm() throws Exception {
189189
(Long)row.get("nodeId"),
190190
(Double) row.get("score")));
191191

192-
System.out.println("actual = " + actual);
193-
194192
assertMapEquals(l2NormExpected, actual);
195193
}
196194

@@ -207,7 +205,24 @@ public void l1Norm() throws Exception {
207205
(Long)row.get("nodeId"),
208206
(Double) row.get("score")));
209207

210-
System.out.println("actual = " + actual);
208+
assertMapEquals(l1NormExpected, actual);
209+
}
210+
211+
@Test
212+
public void l1NormWrite() throws Exception {
213+
final Map<Long, Double> actual = new HashMap<>();
214+
runQuery(
215+
"CALL algo.eigenvector('Character', 'INTERACTS_SEASON1', {direction: 'BOTH', normalization: 'l1Norm', writeProperty: 'eigen'}) ",
216+
row -> {});
217+
218+
runQuery(
219+
"MATCH (c:Character) " +
220+
"RETURN id(c) AS nodeId, c.eigen AS score " +
221+
"ORDER BY score DESC " +
222+
"LIMIT 10",
223+
row -> actual.put(
224+
(Long)row.get("nodeId"),
225+
(Double) row.get("score")));
211226

212227
assertMapEquals(l1NormExpected, actual);
213228
}

0 commit comments

Comments
 (0)