You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geaflow.apache.org by "Leomrlin (via GitHub)" <gi...@apache.org> on 2026/06/18 03:44:15 UTC
[I] Add the Betweenness Centrality graph algorithm [geaflow]
Leomrlin opened a new issue, #801:
URL: https://github.com/apache/geaflow/issues/801
### What & why
GeaFlow has PageRank and ClosenessCentrality, but not **Betweenness Centrality** —
a measure of how often a vertex sits on shortest paths between other vertices,
i.e. how much of a "bridge" it is. It's a core metric for social-network and
key-node analysis. It's also genuinely hard: the classic Brandes algorithm has
two phases (shortest-path counting + dependency accumulation), which makes it a
satisfying high-difficulty challenge.
GeaFlow 有 PageRank、ClosenessCentrality,但缺**介数中心性**(Betweenness)——衡量一个
顶点作为"最短路径桥梁"的重要性,是社交网络/关键节点分析的核心指标。它实现难度大
(经典 Brandes 算法需要两阶段:最短路径计数 + 依赖累积),非常适合作为高难度挑战题。
### The task
Implement Betweenness Centrality on GeaFlow's vertex-centric / message-passing
model (an unweighted-graph version is a fine first cut).
基于 GeaFlow 的顶点中心/消息传递模型实现介数中心性(可先做无权图版本)。
### Where to look / 怎么做
1. Reference the more complex existing algorithms:
`udf/graph/PageRank.java` (multi-iteration + convergence) and
`SingleSourceShortestPath.java` (shortest paths).
2. Implement `AlgorithmUserFunction` using multi-round iteration + `sendMessage`
for shortest-path counting and dependency back-propagation (the Brandes approach).
3. Register in `BuildInSqlFunctionTable.java`.
4. Use a small graph (5–7 nodes), compute the standard answer by hand, and turn
it into `.sql`/`.txt` tests.
### Done when
- [ ] Implemented and registered; `CALL betweenness() YIELD (id, score)` works
- [ ] Results match hand-calculation / NetworkX on a small graph (attach the comparison in the PR)
- [ ] Complexity and suitable scale documented (note it's for small/medium graphs if so)
- [ ] Tests pass
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@geaflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@geaflow.apache.org
For additional commands, e-mail: issues-help@geaflow.apache.org