Skip to content

dextroflask/gsoc_sample_bc_clustering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Betweenness Centrality Clustering – Sample Program

This repository contains a simple demonstration of the betweenness_centrality_clustering function from the Boost Graph Library (BGL). It is meant to showcase how edge betweenness centrality can be used to perform graph clustering.

This sample is part of my GSoC project for pgRouting and is hosted separately for better visibility and testing.


What It Does

The program runs the bc_clustering algorithm on 3 different types of graphs:

  1. Complete Graph (K₅)
    All nodes are interconnected. Clustering gradually disconnects the graph.

  2. Clustered Graph with Bridges
    Three fully connected subgraphs (clusters) connected by bridge edges. The algorithm quickly identifies and removes the bridges, forming clear clusters.

  3. Single Cluster Grid Graph
    A weakly connected graph (3×3 grid) that stays as a single cluster unless extensively pruned.


Highlights

  • Shows edge betweenness centrality in action.
  • Visualizes clustering by printing:
    • Initial edge list
    • Initial connected components (clusters)
    • Edges removed
    • Final clusters

Outputs

image

image

image


Graph Visuals

Drawn on paper WhatsApp Image 2025-04-06 at 16 40 12 (1)

WhatsApp Image 2025-04-06 at 16 40 12


About

Sample working of the Betweeness Centrality Clustering from Boost graph library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages