Initial commit
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
#ifndef MATRIX_HPP
|
||||
#define MATRIX_HPP
|
||||
|
||||
#include <array>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
class Matrix {
|
||||
public:
|
||||
Matrix(int rows, int cols);
|
||||
std::array<int, 2> size() const;
|
||||
double& operator()(int i,int j);
|
||||
double operator()(int i,int j) const;
|
||||
void print() const;
|
||||
|
||||
private:
|
||||
std::vector<double> data;
|
||||
int rows;
|
||||
int cols;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user