# mappo1562/distanciaminimadeedicionextendida architecture

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

- Interactive diagram: https://gitdiagram.com/mappo1562/distanciaminimadeedicionextendida
- Repository: https://github.com/mappo1562/distanciaminimadeedicionextendida

## Overview

##### Main Components Identification
- Algorithm Implementations:
- Brute Force Approach: Folder “FuerzaBruta” contains its C++ implementation (distanciaDeEdicion.cpp).
- Dynamic Programming Approach: Folder “prg_dinamica” holds the dynamic programming C++ implementation (distanciaDeEdicion.cpp).
- Input/Configuration Modules:
- Input File: “entrada.txt” providing the words for edit distance calculations.
- Cost Configuration: Folder “costos” with files defining different cost parameters (insertion, deletion, replacement, transposition). Also include “cost_generator.cpp” which may regenerate these cost parameters.
- Input Generation: “entrada_generator.py” is used to generate randomized input based on given parameters.
- Documentation and Reporting:
- Build Outputs: The generated PDF (tarea_main.pdf in build folder) is the final report output.
- External Tools/Environment:
- The README specifies that the compilation and running occur on Ubuntu via Visual Studio Code. The commands using g++ compile the chosen algorithm into an “out” executable.

##### Relationships and Interactions
- Both algorithm implementations (FuerzaBruta and prg_dinamica) ingest their input from “entrada.txt” and read the cost values from the “costos” directory.
- The outputs (likely computed edit distances) are produced as a binary “out” after compiling the respective C++ source.
- Optional modules: cost_generator and entrada_generator.py serve to prepare or modify the input and cost configurations before execution.

##### Architectural Patterns and Design Principles
- Separation of Concerns: The project clearly separates algorithmic implementations, configuration/input generation, and reporting/documentation.
- Modularity: Multiple small, focused modules (each in its own folder) make the design easier to follow and test independently.
- Explicit Data Flow: The input is read from standardized sources; cost and configuration parameters are maintained in separate files; algorithm output is then channeled into either terminal output or incorporated into the report.

##### Relevant Technologies, Frameworks, and Tools
- C++ (compiled with g++ for algorithm implementations).
- Python (for input generation script).
- LaTeX (for report generation, including TikZ for plots).
- Standard build environment (Ubuntu virtual machine, Visual Studio Code for development).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Configuration/Inputs"
        A("Input File (entrada.txt)"):::config
        B("Cost Configuration (costos)"):::config
        C("Cost Generation Utility (cost_generator.cpp)"):::tool
        D("Input Generation Utility (entrada_generator.py)"):::tool
    end

    subgraph "Algorithm Implementations"
        E("Brute Force Algorithm (FuerzaBruta)"):::algo
        F("Dynamic Programming Algorithm (prg_dinamica)"):::algo
    end

    subgraph "Output"
        G("Executable (out)"):::output
    end

    subgraph "Reporting/Documentation"
        H("Reporting & Documentation (AlgoReportTemplate)"):::report
        I("Experiment Data File (experimentos.xlsx)"):::report
    end

    %% Connections for Configuration/Inputs
    C -->|"updates"| B
    D -->|"generates"| A

    %% Data flows into Algorithm Implementations
    A -->|"feeds"| E
    A -->|"feeds"| F
    B -->|"feeds"| E
    B -->|"feeds"| F

    %% Algorithm outputs
    E -->|"compiles to"| G
    F -->|"compiles to"| G

    %% Reporting flows
    G -->|"logs/output to"| H
    I -->|"supplies experiment data to"| H

    %% Click Events
    click A "https://github.com/mappo1562/distanciaminimadeedicionextendida/blob/main/entrada.txt"
    click B "https://github.com/mappo1562/distanciaminimadeedicionextendida/tree/main/costos"
    click C "https://github.com/mappo1562/distanciaminimadeedicionextendida/blob/main/cost_generator.cpp"
    click D "https://github.com/mappo1562/distanciaminimadeedicionextendida/blob/main/entrada_generator.py"
    click E "https://github.com/mappo1562/distanciaminimadeedicionextendida/blob/main/FuerzaBruta/distanciaDeEdicion.cpp"
    click F "https://github.com/mappo1562/distanciaminimadeedicionextendida/blob/main/prg_dinamica/distanciaDeEdicion.cpp"
    click H "https://github.com/mappo1562/distanciaminimadeedicionextendida/tree/main/AlgoReportTemplate"
    click I "https://github.com/mappo1562/distanciaminimadeedicionextendida/blob/main/experimentos.xlsx"
    
    %% Styling
    classDef config fill:#fceabb,stroke:#e8a947,stroke-width:2px;
    classDef tool fill:#cff3ff,stroke:#0077b6,stroke-width:2px;
    classDef algo fill:#caffbf,stroke:#2b9348,stroke-width:2px;
    classDef output fill:#ffd6a5,stroke:#ffb703,stroke-width:2px;
    classDef report fill:#e0fbfc,stroke:#4ecdc4,stroke-width:2px;
```
