# vufik/algorithms architecture

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

- Interactive diagram: https://gitdiagram.com/vufik/algorithms
- Repository: https://github.com/vufik/algorithms

## Overview

##### Main Components Organization

- Implementation     |

- LibraryC     | |

- LibraryCPP   | |

- LibraryCPPTemplate| |

##### Data Structures Layer

- Data Structures      |

- Linear Structures |   |
- Array          |   |
- Vector         |   |
- List           |   |
- Stack          |   |
- Queue          |   |

- Graph Structures  |   |
- Directed Graph  |   |

##### Testing Framework
Testing architecture:

- Testing Framework   |

- Unit Tests      |   |
- (Per Structure) |   |

Design Guidelines:

##### Component Relationships
How the three main libraries relate:
- LibraryC → Basic C implementations
- LibraryCPP → Object-oriented C++ implementations
- LibraryCPPTemplate → Template-based generic implementations

##### Build System Integration
CMake configuration flow:

- Build System    |

- CMake     | |

Special Considerations:

##### Educational nature
- A section for practice materials
- Relationship to lab solutions
- Link to educational resources

##### Implementation Variants
- Progression from C to C++ to template-based implementations

##### Testing Coverage
- Bidirectional relationships between implementations and their tests
- Test coverage for each data structure

- Implementation languages (C, C++, C++ Templates)
- Data structure types
- Testing framework
- Build system
- Educational materials

Remember to add notes about the specific requirements mentioned in the README:
- Vector size multiplication requirement
- Stack and queue unlimited storage
- Any specific implementation requirements from function headers

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and classes
    classDef cImpl fill:#2196F3,stroke:#1565C0,color:white
    classDef cppImpl fill:#1976D2,stroke:#0D47A1,color:white
    classDef templateImpl fill:#0D47A1,stroke:#052B6B,color:white
    classDef dataStructure fill:#4CAF50,stroke:#2E7D32,color:white
    classDef testing fill:#FF9800,stroke:#F57C00,color:white
    classDef build fill:#9E9E9E,stroke:#616161,color:white
    classDef educational fill:#E91E63,stroke:#C2185B,color:white

    %% Main Implementation Layers
    subgraph Implementation
        LibC["Library C"]:::cImpl
        LibCPP["Library C++"]:::cppImpl
        LibCPPTemplate["Library C++ Template"]:::templateImpl
    end

    %% Data Structures Layer
    subgraph DataStructures
        subgraph LinearStructures
            Array["Array"]:::dataStructure
            Vector["Vector"]:::dataStructure
            List["List"]:::dataStructure
            Stack["Stack"]:::dataStructure
            Queue["Queue"]:::dataStructure
        end
        
        subgraph GraphStructures
            DGraph["Directed Graph"]:::dataStructure
        end
    end

    %% Testing Framework
    subgraph Testing
        TestC["C Library Tests"]:::testing
        TestCPP["C++ Library Tests"]:::testing
        TestTemplate["Template Library Tests"]:::testing
    end

    %% Build System
    subgraph BuildSystem
        CMakeRoot["Root CMake"]:::build
        CMakeC["C Library CMake"]:::build
        CMakeCPP["C++ Library CMake"]:::build
        CMakeTemplate["Template Library CMake"]:::build
    end

    %% Educational Materials
    subgraph Education
        Practice["Practice Materials"]:::educational
        LabSolutions["Lab Solutions"]:::educational
    end

    %% Relationships
    LibC --> Array & Vector & List & Stack & Queue
    LibCPP --> Array & Vector & List & Stack & Queue
    LibCPPTemplate --> Array & Vector & List & Stack & Queue & DGraph
    
    LibC -.-> TestC
    LibCPP -.-> TestCPP
    LibCPPTemplate -.-> TestTemplate
    
    CMakeRoot --> CMakeC & CMakeCPP & CMakeTemplate
    
    %% Click events for component mapping
    click LibC "https://github.com/vufik/Algorithms/tree/master/LibraryC/"
    click LibCPP "https://github.com/vufik/Algorithms/tree/master/LibraryCPP/"
    click LibCPPTemplate "https://github.com/vufik/Algorithms/tree/master/LibraryCPPTemplate/"
    
    click Array "https://github.com/vufik/Algorithms/blob/master/LibraryC/array.h"
    click Vector "https://github.com/vufik/Algorithms/blob/master/LibraryC/vector.h"
    click List "https://github.com/vufik/Algorithms/blob/master/LibraryC/list.h"
    click Stack "https://github.com/vufik/Algorithms/blob/master/LibraryC/stack.h"
    click Queue "https://github.com/vufik/Algorithms/blob/master/LibraryC/queue.h"
    click DGraph "https://github.com/vufik/Algorithms/blob/master/LibraryCPPTemplate/d_graph.h"
    
    click TestC "https://github.com/vufik/Algorithms/tree/master/LibraryC/Tests/"
    click TestCPP "https://github.com/vufik/Algorithms/tree/master/LibraryCPP/Tests/"
    click TestTemplate "https://github.com/vufik/Algorithms/tree/master/LibraryCPPTemplate/Tests/"
    
    click CMakeRoot "https://github.com/vufik/Algorithms/blob/master/CMakeLists.txt"
    click CMakeC "https://github.com/vufik/Algorithms/blob/master/LibraryC/CMakeLists.txt"
    click CMakeCPP "https://github.com/vufik/Algorithms/blob/master/LibraryCPP/CMakeLists.txt"
    click CMakeTemplate "https://github.com/vufik/Algorithms/blob/master/LibraryCPPTemplate/CMakeLists.txt"
    
    click Practice "https://github.com/vufik/Algorithms/tree/master/Practice/"
    click LabSolutions "https://github.com/vufik/Algorithms/tree/master/Solution_of_lab/"
```
