25 lines
411 B
C++
25 lines
411 B
C++
#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
|