From c2e30822461f1ce708da50c57f270eb0ae8f9c99 Mon Sep 17 00:00:00 2001 From: zhoney Date: Tue, 2 Feb 2021 17:53:40 +0800 Subject: [PATCH] fix fusiform and kcore min_groups args default value (#79) Change-Id: I843c595172d7b45b894d764bf859dec61a35c8b5 --- .../com/baidu/hugegraph/job/algorithm/comm/KCoreAlgorithm.java | 2 +- .../job/algorithm/similarity/FusiformSimilarityAlgorithm.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/job/algorithm/comm/KCoreAlgorithm.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/job/algorithm/comm/KCoreAlgorithm.java index 8ea2877961..de707ff353 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/job/algorithm/comm/KCoreAlgorithm.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/job/algorithm/comm/KCoreAlgorithm.java @@ -184,7 +184,7 @@ public Set kcore(Iterator vertices, Directions direction, int minNeighbors = (int) Math.floor(1.0 / alpha * k); SimilarsMap map = fusiformSimilarity(vertices, direction, label, minNeighbors, alpha, k - 1, - 0, null, 1, degree, + 0, null, 0, degree, NO_LIMIT, NO_LIMIT, true); if (map.isEmpty()) { return ImmutableSet.of(); diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/job/algorithm/similarity/FusiformSimilarityAlgorithm.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/job/algorithm/similarity/FusiformSimilarityAlgorithm.java index 68d3ef5485..cb62d71ff8 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/job/algorithm/similarity/FusiformSimilarityAlgorithm.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/job/algorithm/similarity/FusiformSimilarityAlgorithm.java @@ -48,7 +48,7 @@ public class FusiformSimilarityAlgorithm extends AbstractAlgorithm { public static final int DEFAULT_MIN_NEIGHBORS = 10; public static final int DEFAULT_MIN_SIMILARS = 6; public static final int DEFAULT_TOP_SIMILARS = 0; - public static final int DEFAULT_MIN_GROUPS = 1; + public static final int DEFAULT_MIN_GROUPS = 0; @Override public String category() {