Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C-Dynamic-Matrix-Engine

A high-performance C library designed for dynamic matrix manipulations and advanced linear algebra operations. This project emphasizes manual memory management and efficient pointer arithmetic to handle complex mathematical transformations.

🛠️ Engineering Core

  • Dynamic Memory Allocation: Implements nested malloc calls for row-column structuring, ensuring the program only consumes the necessary heap space for any given matrix size.
  • Manual Memory Cleanup: Includes a recursive free logic to prevent memory leaks, maintaining system stability during large-scale computations.
  • Advanced Algebraic Operations: Goes beyond basic arithmetic by implementing tensor-based operations like the Kronecker Product.
  • Dimension Validation: Integrated safety checks for matrix multiplication compatibility (e.g., $ColsA == RowsB$).

✨ Key Features

  • Arithmetic Suite: Robust implementation of Matrix Addition and Subtraction.
  • Multiplication Variants:
    • Standard Product: Classic dot product implementation for linear transformations.
    • Hadamard Product: Element-wise multiplication for specific signal processing use cases.
    • Kronecker Product: Implementation of the tensor product, resulting in expanded block matrices.
  • Scalar Scaling: Efficient scaling of entire data structures by a constant factor.
  • Interactive CLI: A structured menu-driven interface for real-time data input and result visualization.

🧮 Supported Operations & Complexity

Operation Complexity Description
Addition/Subtraction $O(N^2)$ Basic element-wise processing.
Standard Multiplication $O(N^3)$ Iterative dot product calculation.
Hadamard Product $O(N^2)$ Element-wise mapping.
Kronecker Product $O(N^4)$ Block matrix expansion logic.

🚀 Getting Started

Prerequisites

  • A standard C compiler (GCC, Clang, or MSVC).

Compilation

Build the engine using the following command:

gcc -o matrix_engine main.c

About

A specialized C library for dynamic matrix computations, featuring standard, Hadamard, and Kronecker products with manual memory management and pointer arithmetic.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages