mal-math
C++20 mathematics library.
All Classes Namespaces Files Functions Variables Typedefs Concepts
rmatnxn.hpp File Reference

Specialized representation of matrices using reference semantics. More...

#include "mat.hpp"
#include "rmatnxn.inl"
Include dependency graph for rmatnxn.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mal_math::rmat< a, b, T >
 Definition of a reference matrix with dimensions rows x columns and type T More...
 

Namespaces

namespace  mal_math
 Contains mathematical utility functions and classes.
 

Detailed Description

Specialized representation of matrices using reference semantics.

Author
malatindez (Vladyslav Ohlii)
Date
12/09/2023

This header provides a unique matrix implementation, rmat, which utilizes reference semantics to efficiently work with subsets of larger matrices or to share matrix data without copying. Each rmat instance is defined by its dimensions (a and b) and the type of its elements (T), and can be constructed from existing mat or rmat objects if they fit certain size constraints.

The file also includes various operator overloads to make matrix arithmetic more intuitive and straightforward. Additionally, certain utility methods, such as reset(), are provided to simplify matrix manipulations.

Usage:

rmat<2, 3, float> matrixA;
rmat<3, 2, int> matrixB(matrixA);

Note: Care should be taken when working with rmat instances to ensure that the underlying data they reference remains valid.

For implementation details, please refer to "rmatnxn.inl".

Definition in file rmatnxn.hpp.