Last change
on this file since 25e17e9 was 70e11d, checked in by Frederik Heber <heber@…>, 16 years ago |
Inclusion of config.h was missing.
This caused a bug with GSL's inline function definition.
Signed-off-by: Frederik Heber <heber@tabletINS.(none)>
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | /*
|
---|
2 | * linearsystemofequations.hpp
|
---|
3 | *
|
---|
4 | * Created on: Jan 8, 2010
|
---|
5 | * Author: heber
|
---|
6 | */
|
---|
7 |
|
---|
8 | using namespace std;
|
---|
9 |
|
---|
10 | /*********************************************** includes ***********************************/
|
---|
11 |
|
---|
12 | // include config.h
|
---|
13 | #ifdef HAVE_CONFIG_H
|
---|
14 | #include <config.h>
|
---|
15 | #endif
|
---|
16 |
|
---|
17 | #include <gsl/gsl_linalg.h>
|
---|
18 |
|
---|
19 | /****************************************** forward declarations *****************************/
|
---|
20 |
|
---|
21 | class Vector;
|
---|
22 | class GSLMatrix;
|
---|
23 | class GSLVector;
|
---|
24 |
|
---|
25 | /********************************************** declarations *******************************/
|
---|
26 |
|
---|
27 | /** Solver class for a linear system of equations in the form \f$A \cdot x = b\F$.
|
---|
28 | *
|
---|
29 | */
|
---|
30 | class LinearSystemOfEquations {
|
---|
31 | public:
|
---|
32 | LinearSystemOfEquations(int n, int m);
|
---|
33 | ~LinearSystemOfEquations();
|
---|
34 |
|
---|
35 | // setting
|
---|
36 | void Setb(Vector *x);
|
---|
37 | void Setb(double *x);
|
---|
38 | void SetA(double *x);
|
---|
39 | bool SetSymmetric(bool symmetric);
|
---|
40 |
|
---|
41 | // solving
|
---|
42 | bool GetSolutionAsArray(double *&array);
|
---|
43 | bool GetSolutionAsVector(Vector &v);
|
---|
44 |
|
---|
45 | GSLVector *b;
|
---|
46 | GSLVector *x;
|
---|
47 | GSLMatrix *A;
|
---|
48 |
|
---|
49 | private:
|
---|
50 | bool Solve();
|
---|
51 |
|
---|
52 | int rows;
|
---|
53 | int columns;
|
---|
54 |
|
---|
55 | bool IsSymmetric;
|
---|
56 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.