-
Notifications
You must be signed in to change notification settings - Fork 1
/
matrix.h
48 lines (34 loc) · 856 Bytes
/
matrix.h
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*!
@file matrix.h
@brief A class to handle (n,n)-matrices
*/
#ifndef COMPTOP_MATRIX_H
#define COMPTOP_MATRIX_H
#include <vector>
using namespace std;
/*!
@class matrix
@brief A class to handle (n,n)-matrices
*/
class matrix
{
public:
matrix assign(long* a, unsigned long n, unsigned long m);
matrix assign(vector<long> a, unsigned long n, unsigned long m);
matrix nf_smith(void);
matrix nf_frobenius(void);
matrix nf_jordan(void);
void transpose(void);
void print(void);
size_t get_num_rows(void);
size_t get_num_cols(void);
size_t get_num_zero_cols(void);
size_t get_num_non_zero_rows(void);
vector<unsigned long> get_torsion(void);
private:
vector< vector<long> > data;
void nf_smith_rec(size_t row, size_t col);
void nf_frobenius_rec(size_t row, size_t col);
void nf_jordan_rec(size_t row, size_t col);
};
#endif