Volumes/include/LinAlg/matrixmxn.h

27 lines
444 B
C
Raw Normal View History

2024-07-21 15:31:51 +02:00
//
// Created by nb on 21.07.24.
//
#ifndef VOLSVECS_MATRIXMXN_H
#define VOLSVECS_MATRIXMXN_H
namespace LinAlg{
template<short m,short n>
class Matrix{
2024-07-21 19:12:47 +02:00
public:
virtual ~Matrix()=default;
2024-07-21 15:31:51 +02:00
protected:
int static getIndex(short x, short y){
if(x>=m) return -1;
if(y>=n) return -2;
return x+y*n;
}
2024-07-21 19:12:47 +02:00
double _entries[m*n];
2024-07-21 15:31:51 +02:00
};
}
#endif //VOLSVECS_MATRIXMXN_H