# likithb-dev/matrix-eigenvalues-pagerank architecture

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

- Interactive diagram: https://gitdiagram.com/likithb-dev/matrix-eigenvalues-pagerank
- Repository: https://github.com/likithb-dev/matrix-eigenvalues-pagerank

## Overview

This is a small mathematical study and Python implementation of PageRank, not a hosted application. Its main workflow constructs link-transition and Google matrices, computes PageRank by either an eigenvector or power iteration, then checks the result. A separate graph module builds sample directed graphs and provides visualizations. The README documents the conceptual stages; source excerpts show two partly independent implementations, so the graph does not imply that graph.py feeds either solver. Edges are limited to calls visible in excerpts or relationships stated in the README.

Main entry points: [`src/power_iteration.py`](https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/power_iteration.py) (Power Iteration Pipeline), [`src/graph.py`](https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/graph.py) (Directed Graph), [`src/pagerank.py`](https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/pagerank.py) (Google Matrix), [`src/eigenvalues.py`](https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/eigenvalues.py) (Eigenvalue Utilities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_graph["Graph Modeling"]
  node_webgraph["Directed Graph<br/>[graph.py]"]
  node_adjacency["Adjacency Matrix<br/>[graph.py]"]
end

subgraph group_matrices["PageRank Matrices"]
  node_transition_main["Transition Matrix<br/>[pagerank.py]"]
  node_google_main["Google Matrix<br/>[pagerank.py]"]
  node_power_transition["Transition Builder<br/>[power_iteration.py]"]
  node_power_google["Google Matrix Builder<br/>[power_iteration.py]"]
end

subgraph group_solvers["Rank Solvers"]
  node_eigen_solver["Eigenvector Rank<br/>[pagerank.py]"]
  node_eigenvalues["Eigenvalue Utilities<br/>[eigenvalues.py]"]
  node_power_pipeline["Power Iteration Pipeline<br/>[power_iteration.py]"]
  node_power_iter["Iterative Rank<br/>[power_iteration.py]"]
end

subgraph group_inspection["Results and Visualization"]
  node_verification["Rank Verification<br/>[pagerank.py]"]
  node_visualization["Graph and Rank Plots<br/>[graph.py]"]
end

node_user(("Analyst"))

node_user -->|"constructs"| node_webgraph
node_webgraph -->|"represents as"| node_adjacency
node_adjacency -->|"normalizes links"| node_power_transition
node_power_pipeline -->|"calls"| node_power_transition
node_power_pipeline -->|"calls"| node_power_google
node_power_pipeline -->|"calls"| node_power_iter
node_power_transition -->|"supplies matrix"| node_power_google
node_power_google -->|"supplies matrix"| node_power_iter
node_transition_main -->|"feeds"| node_google_main
node_google_main -->|"solves eigenvector"| node_eigen_solver
node_eigen_solver -->|"calls"| node_eigenvalues
node_google_main -->|"checks residual"| node_verification
node_eigen_solver -->|"checks result"| node_verification
node_power_iter -->|"cross-checks"| node_verification
node_webgraph -->|"draws graph"| node_visualization

click node_webgraph "https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/graph.py"
click node_adjacency "https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/graph.py"
click node_transition_main "https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/pagerank.py"
click node_google_main "https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/pagerank.py"
click node_eigen_solver "https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/pagerank.py"
click node_eigenvalues "https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/eigenvalues.py"
click node_power_pipeline "https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/power_iteration.py"
click node_power_transition "https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/power_iteration.py"
click node_power_google "https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/power_iteration.py"
click node_power_iter "https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/power_iteration.py"
click node_verification "https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/pagerank.py"
click node_visualization "https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/graph.py"

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_webgraph,node_adjacency toneBlue
class node_transition_main,node_google_main,node_power_transition,node_power_google toneAmber
class node_eigen_solver,node_eigenvalues,node_power_pipeline,node_power_iter toneMint
class node_verification,node_visualization toneRose
class node_user toneIndigo
```

## Components

### Graph Modeling

- [Directed Graph](https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/graph.py): `src/graph.py`
- [Adjacency Matrix](https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/graph.py): `src/graph.py`

### PageRank Matrices

- [Transition Matrix](https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/pagerank.py): `src/pagerank.py`
- [Google Matrix](https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/pagerank.py): `src/pagerank.py`
- [Transition Builder](https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/power_iteration.py): `src/power_iteration.py`
- [Google Matrix Builder](https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/power_iteration.py): `src/power_iteration.py`

### Rank Solvers

- [Eigenvector Rank](https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/pagerank.py): `src/pagerank.py`
- [Eigenvalue Utilities](https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/eigenvalues.py): `src/eigenvalues.py`
- [Power Iteration Pipeline](https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/power_iteration.py): `src/power_iteration.py`
- [Iterative Rank](https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/power_iteration.py): `src/power_iteration.py`

### Results and Visualization

- [Rank Verification](https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/pagerank.py): `src/pagerank.py`
- [Graph and Rank Plots](https://github.com/likithb-dev/matrix-eigenvalues-pagerank/blob/main/src/graph.py): `src/graph.py`

### Other components

- **Analyst**

## Connections

- Analyst → Directed Graph: constructs (evidence: `README.md`)
- Directed Graph → Adjacency Matrix: represents as (evidence: `README.md`)
- Adjacency Matrix → Transition Builder: normalizes links (evidence: `README.md`)
- Power Iteration Pipeline → Transition Builder: calls (evidence: `src/power_iteration.py`)
- Power Iteration Pipeline → Google Matrix Builder: calls (evidence: `src/power_iteration.py`)
- Power Iteration Pipeline → Iterative Rank: calls (evidence: `src/power_iteration.py`)
- Transition Builder → Google Matrix Builder: supplies matrix (evidence: `src/power_iteration.py`)
- Google Matrix Builder → Iterative Rank: supplies matrix (evidence: `src/power_iteration.py`)
- Transition Matrix → Google Matrix: feeds (evidence: `README.md`)
- Google Matrix → Eigenvector Rank: solves eigenvector (evidence: `README.md`)
- Eigenvector Rank → Eigenvalue Utilities: calls (evidence: `src/pagerank.py`)
- Google Matrix → Rank Verification: checks residual (evidence: `src/pagerank.py`)
- Eigenvector Rank → Rank Verification: checks result (evidence: `README.md`)
- Iterative Rank → Rank Verification: cross-checks (evidence: `README.md`)
- Directed Graph → Graph and Rank Plots: draws graph (evidence: `src/graph.py`)
