# michaelstergiaris/dijkstra_implementation_cpp architecture

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

- Interactive diagram: https://gitdiagram.com/michaelstergiaris/dijkstra_implementation_cpp
- Repository: https://github.com/michaelstergiaris/dijkstra_implementation_cpp

## Overview

This small C++ program demonstrates weighted-graph shortest paths: its entry point builds a sample graph, runs Dijkstra from node 0, and prints distances and paths. The graph structure and function declarations are in Dijkstra.h; Dijkstra.cpp implements graph setup, the algorithm, and result formatting. The entry point orchestrates these calls, while the result printer uses the recursive path formatter. The map reflects only the supplied excerpts; no README or additional runtime subsystems were present.

Main entry points: [`Software_task.cpp`](https://github.com/michaelstergiaris/dijkstra_implementation_cpp/blob/main/Software_task.cpp) (Demo entry point), [`Dijkstra.cpp`](https://github.com/michaelstergiaris/dijkstra_implementation_cpp/blob/main/Dijkstra.cpp) (Result formatter), [`Dijkstra.h`](https://github.com/michaelstergiaris/dijkstra_implementation_cpp/blob/main/Dijkstra.h) (Graph structure)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_demo["Demo entry point<br/>[Software_task.cpp]"]
node_graph["Graph structure<br/>[Dijkstra.h]"]
node_setup["Graph setup<br/>[Dijkstra.cpp]"]
node_algorithm["Dijkstra algorithm<br/>[Dijkstra.cpp]"]
node_results["Result formatter<br/>[Dijkstra.cpp]"]
node_paths["Path formatter<br/>[Dijkstra.cpp]"]
node_console(("Standard output"))

node_demo -->|"initializes and adds edges"| node_setup
node_setup -->|"writes graph"| node_graph
node_demo -->|"runs"| node_algorithm
node_algorithm -->|"reads graph"| node_graph
node_demo -->|"prints results"| node_results
node_results -->|"prints paths with"| node_paths
node_results -->|"writes output"| node_console
node_paths -->|"writes path"| node_console
node_user -.->|"runs"| node_demo

click node_demo "https://github.com/michaelstergiaris/dijkstra_implementation_cpp/blob/main/Software_task.cpp"
click node_graph "https://github.com/michaelstergiaris/dijkstra_implementation_cpp/blob/main/Dijkstra.h"
click node_setup "https://github.com/michaelstergiaris/dijkstra_implementation_cpp/blob/main/Dijkstra.cpp"
click node_algorithm "https://github.com/michaelstergiaris/dijkstra_implementation_cpp/blob/main/Dijkstra.cpp"
click node_results "https://github.com/michaelstergiaris/dijkstra_implementation_cpp/blob/main/Dijkstra.cpp"
click node_paths "https://github.com/michaelstergiaris/dijkstra_implementation_cpp/blob/main/Dijkstra.cpp"

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_user toneBlue
class node_demo,node_graph,node_setup,node_algorithm,node_results,node_paths toneTeal
class node_console toneIndigo
```

## Components

### Other components

- **User**
- [Demo entry point](https://github.com/michaelstergiaris/dijkstra_implementation_cpp/blob/main/Software_task.cpp): `Software_task.cpp`
- [Graph structure](https://github.com/michaelstergiaris/dijkstra_implementation_cpp/blob/main/Dijkstra.h): `Dijkstra.h`
- [Graph setup](https://github.com/michaelstergiaris/dijkstra_implementation_cpp/blob/main/Dijkstra.cpp): `Dijkstra.cpp`
- [Dijkstra algorithm](https://github.com/michaelstergiaris/dijkstra_implementation_cpp/blob/main/Dijkstra.cpp): `Dijkstra.cpp`
- [Result formatter](https://github.com/michaelstergiaris/dijkstra_implementation_cpp/blob/main/Dijkstra.cpp): `Dijkstra.cpp`
- [Path formatter](https://github.com/michaelstergiaris/dijkstra_implementation_cpp/blob/main/Dijkstra.cpp): `Dijkstra.cpp`
- **Standard output**

## Connections

- Demo entry point → Graph setup: initializes and adds edges (evidence: `Software_task.cpp`)
- Graph setup → Graph structure: writes graph (evidence: `Dijkstra.cpp`)
- Demo entry point → Dijkstra algorithm: runs (evidence: `Software_task.cpp`)
- Dijkstra algorithm → Graph structure: reads graph (evidence: `Dijkstra.cpp`)
- Demo entry point → Result formatter: prints results (evidence: `Software_task.cpp`)
- Result formatter → Path formatter: prints paths with (evidence: `Dijkstra.cpp`)
- Result formatter → Standard output: writes output (evidence: `Dijkstra.cpp`)
- Path formatter → Standard output: writes path (evidence: `Dijkstra.cpp`)
- User → Demo entry point: runs
