# sonaelzasimon/cgs_configurable_graph_summarization architecture

> Architecture diagram of the GitHub repository sonaelzasimon/cgs_configurable_graph_summarization, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sonaelzasimon/cgs_configurable_graph_summarization
- Repository: https://github.com/sonaelzasimon/cgs_configurable_graph_summarization

## Overview

CGS compresses an input graph into an edge list and supernode mapping, then supports neighbourhood, shortest-path, and reachability analysis over the original and compressed graphs. The graph shows the documented command workflows and the sampled implementation responsibilities. Query executables contain their own graph-loading, query, and reporting logic; source excerpts do not establish separate shared runtime layers.

Main entry points: [`CGS_compression.cpp`](https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/blob/main/CGS_compression.cpp) (CGS compressor), [`Dataset`](https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/tree/main/Dataset) (Input graph), [`Compressed`](https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/tree/main/Compressed) (Compressed graph files), [`CGS_NQ.cpp`](https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/blob/main/CGS_NQ.cpp) (Neighbourhood analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_compression["Graph compression"]
  node_compressor["CGS compressor"]
  node_compression_results["Compression report"]
end

subgraph group_representation["Graph representation"]
  node_dataset["Input graph"]
  node_compressed["Compressed graph files"]
  node_graph_model["Graph model"]
end

subgraph group_queries["Query analysis"]
  node_nq["Neighbourhood analysis<br/>[CGS_NQ.cpp]"]
  node_rq["Reachability analysis<br/>[CGS_RQ.cpp]"]
  node_sp["Shortest-path analysis<br/>[CGS_SP.cpp]"]
  node_nq_results["Neighbourhood report"]
  node_rq_results["Reachability report"]
  node_sp_results["Shortest-path report"]
end

node_user(("User"))

node_user -->|"runs"| node_compressor
node_dataset -->|"reads"| node_compressor
node_compressor -->|"writes"| node_compressed
node_compressor -->|"writes report"| node_compression_results
node_user -->|"runs"| node_nq
node_user -->|"runs"| node_rq
node_user -->|"runs"| node_sp
node_dataset -->|"reads"| node_nq
node_compressed -->|"loads"| node_nq
node_dataset -->|"reads"| node_rq
node_compressed -->|"loads"| node_rq
node_dataset -->|"reads"| node_sp
node_compressed -->|"loads"| node_sp
node_nq -->|"writes report"| node_nq_results
node_rq -->|"writes report"| node_rq_results
node_sp -->|"writes report"| node_sp_results
node_compressor -->|"uses"| node_graph_model

click node_dataset "https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/tree/main/Dataset"
click node_compressor "https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/blob/main/CGS_compression.cpp"
click node_compressed "https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/tree/main/Compressed"
click node_graph_model "https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/blob/main/CGS_compression.cpp"
click node_nq "https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/blob/main/CGS_NQ.cpp"
click node_rq "https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/blob/main/CGS_RQ.cpp"
click node_sp "https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/blob/main/CGS_SP.cpp"
click node_compression_results "https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/tree/main/Compression_Results"
click node_nq_results "https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/tree/main/NQ_Results"
click node_rq_results "https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/tree/main/RQ_Results"
click node_sp_results "https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/tree/main/SP_Results"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_compressor,node_compression_results,node_user toneBlue
class node_dataset,node_compressed,node_graph_model toneAmber
class node_nq,node_rq,node_sp,node_nq_results,node_rq_results,node_sp_results toneMint
```

## Components

### Graph compression

- [CGS compressor](https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/blob/main/CGS_compression.cpp): `CGS_compression.cpp`
- [Compression report](https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/tree/main/Compression_Results): `Compression_Results`

### Graph representation

- [Input graph](https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/tree/main/Dataset): `Dataset`
- [Compressed graph files](https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/tree/main/Compressed): `Compressed`
- [Graph model](https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/blob/main/CGS_compression.cpp): `CGS_compression.cpp`

### Query analysis

- [Neighbourhood analysis](https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/blob/main/CGS_NQ.cpp): `CGS_NQ.cpp`
- [Reachability analysis](https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/blob/main/CGS_RQ.cpp): `CGS_RQ.cpp`
- [Shortest-path analysis](https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/blob/main/CGS_SP.cpp): `CGS_SP.cpp`
- [Neighbourhood report](https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/tree/main/NQ_Results): `NQ_Results`
- [Reachability report](https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/tree/main/RQ_Results): `RQ_Results`
- [Shortest-path report](https://github.com/sonaelzasimon/cgs_configurable_graph_summarization/tree/main/SP_Results): `SP_Results`

### Other components

- **User**

## Connections

- User → CGS compressor: runs (evidence: `README.md`)
- Input graph → CGS compressor: reads (evidence: `README.md`)
- CGS compressor → Compressed graph files: writes (evidence: `README.md`)
- CGS compressor → Compression report: writes report (evidence: `README.md`)
- User → Neighbourhood analysis: runs (evidence: `README.md`)
- User → Reachability analysis: runs (evidence: `README.md`)
- User → Shortest-path analysis: runs (evidence: `README.md`)
- Input graph → Neighbourhood analysis: reads (evidence: `CGS_NQ.cpp`)
- Compressed graph files → Neighbourhood analysis: loads (evidence: `CGS_NQ.cpp`)
- Input graph → Reachability analysis: reads (evidence: `CGS_RQ.cpp`)
- Compressed graph files → Reachability analysis: loads (evidence: `CGS_RQ.cpp`)
- Input graph → Shortest-path analysis: reads (evidence: `CGS_SP.cpp`)
- Compressed graph files → Shortest-path analysis: loads (evidence: `CGS_SP.cpp`)
- Neighbourhood analysis → Neighbourhood report: writes report (evidence: `README.md`)
- Reachability analysis → Reachability report: writes report (evidence: `README.md`)
- Shortest-path analysis → Shortest-path report: writes report (evidence: `README.md`)
- CGS compressor → Graph model: uses (evidence: `CGS_compression.cpp`)
