Skip to content

This is a comprehensive algorithm format for the implementation of the first 10 algorithms found in our Numerical analysis coours for our data science cours at ISJ

Notifications You must be signed in to change notification settings

menoc61/numerical_algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Numerical Algorithms Library

Implementation of numerical algorithms from COURS L3 Pr. TEMGOUA

A comprehensive Python library implementing 10 fundamental numerical algorithms for solving linear systems, matrix decompositions, and iterative methods.


Table of Contents

  1. Overview
  2. Installation
  3. Project Structure
  4. Algorithms Implemented
  5. Quick Start Guide
  6. Usage Examples
  7. Interactive Testing
  8. Running Tests
  9. User Guidelines
  10. References

Overview

This library provides Python implementations of classical numerical algorithms for linear algebra, based on the course material from COURS L3 Pr. TEMGOUA. All algorithms are:

  • Refactored for numerical stability using machine epsilon
  • Well-documented with NumPy-style docstrings
  • Validated with a comprehensive unit test suite
  • Optimized with NumPy vectorization while maintaining educational clarity

Installation

Requirements

  • Python 3.8 or higher
  • NumPy
  • Tabulate (for interactive results)

Setup

# Install dependencies
pip install numpy tabulate

# Verify installation
python -c "from algorithms import algo1_inverse_lower; print('OK')"

Project Structure

numerical_algorithms/
├── README.md                    # Overview and installation
├── user_guideline.md            # Detailed algorithm explanations and notations
├── interactive_test.py          # Enhanced interactive testing interface
│
├── algorithms/                  # Algorithm implementations
│   ├── __init__.py
│   ├── algo1_inverse_lower.py  # Inverse of lower triangular matrix
│   ├── algo2_forward_sub.py    # Forward substitution
│   ├── algo3_back_sub.py       # Back substitution
│   ├── algo4_gauss_elim.py     # Gauss elimination
│   ├── algo5_lu_decomp.py      # LU decomposition
│   ├── algo6_cholesky.py       # Cholesky decomposition
│   ├── algo7_householder_qr.py # Householder QR decomposition
│   ├── algo8_iterative_general.py  # General iterative methods
│   ├── algo9_jacobi.py         # Jacobi algorithm
│   └── algo10_gauss_seidel.py  # Gauss-Seidel method
│
└── tests/                       # Unit test suite
    ├── __init__.py
    ├── test_algo1.py ... test_algo10.py
    └── test_all.py              # Consolidated test runner

Quick Start Guide

1. Interactive Mode (Recommended)

python interactive_test.py

This launches a menu-driven interface using tabulate for clear output formatting.

2. Run All Tests

python tests/test_all.py

3. Run Individual Tests

python tests/test_algo1.py
python tests/test_algo9.py
# ... etc.

Interactive Testing

The interactive test suite provides a user-friendly menu for testing all algorithms with your own data or example matrices.

python interactive_test.py

User Guidelines

For a deep dive into the mathematical notations, implementation details, and step-by-step logic of each algorithm, please refer to the user_guideline.md file.


References

  • COURS L3 Pr. TEMGOUA - Primary source for all algorithms
  • Golub, G. H., & Van Loan, C. F. (2013). Matrix Computations (4th ed.)
  • Trefethen, L. N., & Bau, D. (1997). Numerical Linear Algebra

Author

**Momeni Gilles **


License

This educational implementation is provided for learning purposes based on the course material from COURS L3 Pr. TEMGOUA.

About

This is a comprehensive algorithm format for the implementation of the first 10 algorithms found in our Numerical analysis coours for our data science cours at ISJ

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages