amalgam/src/FM/Matrix.h

36 lines
581 B
C++

/*
* Filename: Matrix.h
*
* Description:
*
*
* Version:
* Created: Sun Mar 8 08:11:11 2020
* Revision: None
* Author: Rachel Fae Fox (foxiepaws),fox@foxiepa.ws
*
*/
#pragma once
#include <array>
namespace amalgam {
namespace FM {
template <class T, int N>
class Matrix {
public:
std::array<std::array<T, N+1>, N> v; // gain
std::array<T,N+1> *operator[] (int row){
return &v[row];
}
T *operator()(int row, int col) {
return &v[row][col];
}
};
}
}
/* Local Variables: */
/* mode: c++ */
/* End: */
/* vim: ft=cpp: */