Flow123d
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
flow123d
src
mesh
ngh
include
matrix.h
Go to the documentation of this file.
1
#ifndef matrixH
2
#define matrixH
3
4
#include <iostream>
5
6
typedef
enum
{
7
no_solution
,
8
one_solution
,
9
inf_solutions
,
10
badconditioned
,
11
singular
12
}
TNSolutions
;
13
14
class
TMatrix
{
15
private
:
16
int
nc
;
17
int
nr
;
18
19
double
*
elm
;
20
21
public
:
22
TMatrix
(
int
);
23
TMatrix
(
const
TMatrix
&);
24
TMatrix
(
int
,
int
);
25
~TMatrix
();
26
27
int
NRows
()
const
;
28
int
NCols
()
const
;
29
30
void
Set
(
int
,
int
,
double
);
31
double
Get
(
int
,
int
)
const
;
32
33
void
SwapRows
(
int
,
int
);
34
35
friend
std::ostream &
operator <<
(std::ostream&,
const
TMatrix
&);
36
};
37
38
class
TMVector
{
39
private
:
40
int
size
;
41
42
double
*
elm
;
43
44
public
:
45
TMVector
(
int
);
46
TMVector
(
const
TMVector
&);
47
~TMVector
();
48
49
void
Set
(
int
,
double
);
50
double
Get
(
int
);
51
void
SwapElements
(
int
,
int
);
52
53
friend
std::ostream &
operator <<
(std::ostream&,
const
TMVector
&);
54
};
55
56
TNSolutions
Gauss
(
const
TMatrix
&,
TMVector
*,
const
TMVector
&);
57
58
#endif
Generated on Thu May 29 2014 23:14:49 for Flow123d by
1.8.4