Skip to content

A compile-time sized matrix library using C++ templates, NTTPs, operator overloading, static assertions, and custom iterators. Focused on type safety, performance, and modern C++ design.

Notifications You must be signed in to change notification settings

PopoviciGabriel/Matrix-Template-Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Matrix Template Library (C++)

Overview

This project implements a compile-time sized matrix library in modern C++, using templates and non-type template parameters (NTTPs).
Matrix dimensions are known at compile time, providing strong type safety and preventing invalid matrix operations.

Features

  • Generic matrix class: Matrix<T, Rows, Cols>
  • Compile-time dimension checking
  • Operator overloading: +, -, *, (), <<
  • Matrix transpose
  • Determinant and inverse for 2×2 matrices
  • Supports multiple numeric types (int, double, etc.)
  • Runtime error handling for singular matrices

Design

Matrix dimensions are enforced at compile time:

Matrix<int, 2, 3> A;
Matrix<int, 3, 2> B;
auto C = A * B; // Valid

About

A compile-time sized matrix library using C++ templates, NTTPs, operator overloading, static assertions, and custom iterators. Focused on type safety, performance, and modern C++ design.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages