27 lines
444 B
C++
27 lines
444 B
C++
//
|
|
// Created by nb on 21.07.24.
|
|
//
|
|
|
|
#ifndef VOLSVECS_MATRIXMXN_H
|
|
#define VOLSVECS_MATRIXMXN_H
|
|
|
|
namespace LinAlg{
|
|
template<short m,short n>
|
|
class Matrix{
|
|
public:
|
|
|
|
virtual ~Matrix()=default;
|
|
|
|
protected:
|
|
int static getIndex(short x, short y){
|
|
if(x>=m) return -1;
|
|
if(y>=n) return -2;
|
|
return x+y*n;
|
|
}
|
|
|
|
double _entries[m*n];
|
|
};
|
|
}
|
|
|
|
#endif //VOLSVECS_MATRIXMXN_H
|