feat: add degree centrality (#77)
authorzyxxoo <1318247699@qq.com>
Wed, 11 Aug 2021 12:56:34 +0000 (20:56 +0800)
committerGitHub <noreply@github.com>
Wed, 11 Aug 2021 12:56:34 +0000 (20:56 +0800)
commitaa8daecdd7a9eade5bc5107c216637b7deb7350c
tree9f1839b3b4ca2e375ae7b5218fb4e44df8c8b833
parent5cde5201742b38f67289073591a1a67c1cd2a28f
feat: add degree centrality (#77)

* feat: add degree centrality

* feat: add degree centrality

* feat: cal weight degreen centrality

* fix: params bug

* chore: improve style

* chore: handle more hugeType for weight property and add output test to test result

* refactor: number value extends Number type

* chore: improve code style

* chore: add TODO

* modify job id

* fix test

Co-authored-by: coderzc <zc1217zc@126.com>
12 files changed:
computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/degree/DegreeCentrality.java [new file with mode: 0644]
computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/degree/DegreeCentralityParams.java [new file with mode: 0644]
computer-algorithm/src/main/java/com/baidu/hugegraph/computer/algorithm/degreecentrality/DegreeCentrality.java [new file with mode: 0644]
computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/DoubleValue.java
computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/FloatValue.java
computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/IntValue.java
computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/LongValue.java
computer-dist/pom.xml
computer-test/src/main/java/com/baidu/hugegraph/computer/algorithm/AlgorithmTestBase.java [new file with mode: 0644]
computer-test/src/main/java/com/baidu/hugegraph/computer/algorithm/AlgorithmTestSuite.java
computer-test/src/main/java/com/baidu/hugegraph/computer/algorithm/centrality/degree/DegreeCentralityTest.java [new file with mode: 0644]
computer-test/src/main/java/com/baidu/hugegraph/computer/algorithm/rank/pagerank/PageRankTest.java