Skip to content

Commit 1017146

Browse files
authored
Merge pull request #9650 from vnickolov/similarity-facades-api-modules
Create `similarity-facade-api` module
2 parents c3b6ec8 + 03dc8db commit 1017146

File tree

94 files changed

+345
-107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+345
-107
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apply plugin: 'java-library'
2+
3+
description = 'Neo4j Graph Data Science :: Similarity Algorithms Parameters'
4+
5+
group = 'org.neo4j.gds'
6+
7+
dependencies {
8+
compileOnly openGds.jetbrains.annotations
9+
10+
implementation project(':annotations')
11+
implementation project(':concurrency')
12+
implementation project(':graph-projection-api')
13+
implementation project(':string-formatting')
14+
15+
// Because of `Intersections`
16+
// TODO: move Intersections out of `core`
17+
implementation project(':core')
18+
}

algo/src/main/java/org/neo4j/gds/similarity/filteredknn/TargetNodeFilter.java renamed to algo-params/similarity-params/src/main/java/org/neo4j/gds/similarity/filteredknn/TargetNodeFilter.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,10 @@
1919
*/
2020
package org.neo4j.gds.similarity.filteredknn;
2121

22-
import org.neo4j.gds.similarity.SimilarityResult;
2322
import org.neo4j.gds.similarity.knn.NeighbourConsumer;
2423

25-
import java.util.stream.Stream;
26-
2724

2825
public interface TargetNodeFilter extends NeighbourConsumer {
29-
30-
31-
/**
32-
* As part of an instrumentation of KNN this is a handy utility.
33-
*/
34-
Stream<SimilarityResult> asSimilarityStream(long nodeId);
3526
/**
3627
* As part of an instrumentation of KNN this is a handy utility.
3728
*/
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright (c) "Neo4j"
3+
* Neo4j Sweden AB [http://neo4j.com]
4+
*
5+
* This file is part of Neo4j.
6+
*
7+
* Neo4j is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
*/
20+
package org.neo4j.gds.similarity.filteredknn;
21+
22+
import org.neo4j.gds.similarity.knn.NeighbourConsumers;
23+
24+
import java.util.function.LongPredicate;
25+
26+
public interface TargetNodeFiltering extends NeighbourConsumers {
27+
28+
boolean isTargetNodeFiltered();
29+
30+
31+
default SeedingSummary seedingSummary() {
32+
return SeedingSummary.EMPTY_SEEDING_SUMMARY;
33+
}
34+
35+
long numberOfSimilarityPairs(LongPredicate sourceNodePredicate);
36+
}

0 commit comments

Comments
 (0)