# nestor-florehs/practica1paed architecture

> Architecture diagram of the GitHub repository nestor-florehs/practica1paed, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-31). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nestor-florehs/practica1paed
- Repository: https://github.com/nestor-florehs/practica1paed

## Overview

##### Project Type and Purpose
- This is a practice/assignment project focused on implementing and comparing various sorting algorithms (Insertion Sort, Selection Sort, Merge Sort, Quick Sort).
- Additionally, there is a component for extracting and transforming data (from files into lists of dictionaries) and some use of tkinter for file selection.

##### Analysis of the File Structure
- All the Python scripts are at the top level, indicating a modular script-based design rather than a multi-layered application.
- The scripts include specific modules for:
- Sorting algorithms: InsertionSort.py, SelectionSort.py, MergeSort.py, QuickSort.py.
- Data operations: ExtractData.py (data extraction) and SortData.py (demonstrations of sorting usage).
- Utility tasks: weightCalculation.py (calculates task weights) and GenerateGrafic.py (creates execution time graphs).
- No nested directories or complex build/deployment configurations suggest that the focus is on algorithm functionality and performance testing.

##### README Insights
- The README clearly delineates the purpose of each file and explains how the individual modules are used:
- The “Sorting de listas” section clarifies sorting operations on lists of dictionaries using different keys.
- The “Cálculo de pesos” covers weight calculation logic.
- The “Visualización gráfica” describes the use of matplotlib for plotting performance graphs.
- There is mention of tkinter for file selection, indicating some interactive element.
- The README also includes a sample function for running a performance graph, which shows that these components interact to gather data, process it via sorting algorithms and weight calculations, and produce graphical output.

## Diagram (Mermaid)

```mermaid
flowchart TD
    DataInput["Data Input (tkinter)"]:::data
    ExtractData["Data Extraction"]:::data
    WeightCalculation["Weight Calculation"]:::data

    DataInput -->|"FileSelected"| ExtractData
    ExtractData -->|"ExtractedData"| WeightCalculation
    WeightCalculation -->|"ProcessedData"| SortData

    subgraph "Sorting Engine"
        SortData["Sort Data Coordination"]:::algorithm
        InsertionSort["Insertion Sort"]:::algorithm
        SelectionSort["Selection Sort"]:::algorithm
        MergeSort["Merge Sort"]:::algorithm
        QuickSort["Quick Sort"]:::algorithm
        SortData -->|"sortsUsing"| InsertionSort
        SortData -->|"sortsUsing"| SelectionSort
        SortData -->|"sortsUsing"| MergeSort
        SortData -->|"sortsUsing"| QuickSort
    end

    SortData -->|"PerformanceData"| GenerateGrafic
    GenerateGrafic["Graph Visualization"]:::visualization

    click ExtractData "https://github.com/nestor-florehs/practica1paed/blob/main/ExtractData.py"
    click WeightCalculation "https://github.com/nestor-florehs/practica1paed/blob/main/weightCalculation.py"
    click InsertionSort "https://github.com/nestor-florehs/practica1paed/blob/main/InsertionSort.py"
    click SelectionSort "https://github.com/nestor-florehs/practica1paed/blob/main/SelectionSort.py"
    click MergeSort "https://github.com/nestor-florehs/practica1paed/blob/main/MergeSort.py"
    click QuickSort "https://github.com/nestor-florehs/practica1paed/blob/main/QuickSort.py"
    click SortData "https://github.com/nestor-florehs/practica1paed/blob/main/SortData.py"
    click GenerateGrafic "https://github.com/nestor-florehs/practica1paed/blob/main/GenerateGrafic.py"

    classDef data fill:#ADD8E6,stroke:#00008B,color:#000000;
    classDef algorithm fill:#90EE90,stroke:#006400,color:#000000;
    classDef visualization fill:#FFD700,stroke:#FFA500,color:#000000;
```
