-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpolymat.hpp
More file actions
32 lines (29 loc) · 853 Bytes
/
polymat.hpp
File metadata and controls
32 lines (29 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef _POLYMAT_HPP_
#define _POLYMAT_HPP_
#include "poly.hpp"
class PolyMat {
Poly *poly;
int rows;
int cols;
private:
void add(const PolyMat& x);
void mul(const PolyMat& x, const PolyMat& y);
public:
PolyMat();
PolyMat(int r, int c);
PolyMat(const PolyMat& x);
PolyMat& operator=(const PolyMat& x);
~PolyMat();
int row() { return rows; }
int col() { return cols; }
Poly& get(int r, int c);
const Poly& get(int r, int c) const;
void reserve(int r, int c);
void set(int r, int c, const Poly& x);
void transpose(PolyMat& x);
PolyMat& operator +=(const PolyMat& x);
friend PolyMat operator +(const PolyMat& x, const PolyMat& y);
friend PolyMat operator *(const PolyMat& x, const PolyMat& y);
void println();
};
#endif // _POLYMAT_HPP_