Brandes
A parallel implementation of Brandes' algorithm for betweenness centrality.
Install / Use
/learn @m-chrzan/BrandesREADME
Brandes' Algorithm
A parallel implementation of Brandes' algorithm for calculating betweenness centrality in unweighted graphs.
Building
mkdir build
cd build
cmake ..
make
Running
./brandes <number threads> <input file> <output file>
Graph representation
This implementation expects a simple, directed, unweighted graph with vertices labeled with integers.
Sample input file:
0 2
2 0
2 3
2 4
3 2
3 5
3 6
Here each line represents a directed edge from the first node to the second.
The output will contain a line for each node with at least one out edge, of the
form <node> <BC[node]>. Thus for the above sample input, the output file
should contain:
0 0
2 6
3 4
Links
-
A Faster Algorithm for Betweenness Centrality (U. Brandes)
-
Parallel Algorithms for Evaluating Centrality Indices in Real-World Networks (D. A. Bader, K. Madduri)
Related Skills
node-connect
352.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
