#include <band_matrix.h>
Inheritance diagram for BandeMatrix:


Public Member Functions | |
| BandeMatrix (int taille, int kl, int ku) | |
| int | FactoLU () |
| perform LU facotrization | |
| double & | operator() (int i, int j) |
| access to the coordinate i,j | |
| int | PrintCompressed (char *f) |
| int | Solve (Vector *r) |
| solve the system Ax=b where b is residu parameter and A is current class. | |
| int | zero () |
| ~BandeMatrix () | |
Private Attributes | |
| int | dim |
| int | kl |
| int | ku |
| double | nulle |
Definition at line 56 of file band_matrix.h.
| BandeMatrix::BandeMatrix | ( | int | taille, | |
| int | kl, | |||
| int | ku | |||
| ) | [inline] |
Definition at line 60 of file band_matrix.h.
References dim, MyMatrix< BandeMatrix >::matrix, nulle, and zero().
00060 :MyMatrix<BandeMatrix>(taille,taille){ 00061 this->kl = kl; 00062 this->ku = ku; 00063 dim = 2*kl+ku+1; 00064 matrix = new double[taille*dim]; 00065 zero(); 00066 nulle=0; 00067 };
Here is the call graph for this function:

| BandeMatrix::~BandeMatrix | ( | ) | [inline] |
| int BandeMatrix::FactoLU | ( | ) | [inline] |
perform LU facotrization
Reimplemented from MyMatrix< BandeMatrix >.
Definition at line 82 of file band_matrix.h.
References MyMatrix< BandeMatrix >::_m, factoLUBand(), kl, ku, MyMatrix< BandeMatrix >::matrix, and MyMatrix< BandeMatrix >::pivot.
00082 { 00083 pivot = factoLUBand(matrix,kl,ku,_m); 00084 if (pivot==0) 00085 return -1; 00086 else 00087 return 0; 00088 }
Here is the call graph for this function:

| double& BandeMatrix::operator() | ( | int | i, | |
| int | j | |||
| ) | [inline] |
access to the coordinate i,j
Reimplemented from MyMatrix< BandeMatrix >.
Reimplemented in DiagMatrix.
Definition at line 70 of file band_matrix.h.
References dim, kl, ku, MyMatrix< BandeMatrix >::matrix, and nulle.
00070 { 00071 int k = j-i; 00072 00073 // diagonale supérieure 00074 if (k>ku || k < -kl){ 00075 nulle = 0; 00076 return nulle; 00077 } 00078 00079 return matrix[kl+ku-k+j*dim]; 00080 }
| int BandeMatrix::PrintCompressed | ( | char * | f | ) | [inline] |
Definition at line 100 of file band_matrix.h.
References MyMatrix< BandeMatrix >::_m, dim, file, and MyMatrix< BandeMatrix >::matrix.
00100 { 00101 FILE * file = fopen(f,"wb+"); 00102 00103 for (int i=0;i< dim;++i) 00104 for (int j=0;j< _m;++j) 00105 { 00106 fprintf(file,"%d\t%d\t%.15e\n",i+1,j+1,matrix[i+dim*j]); 00107 } 00108 00109 fclose(file); 00110 return 0; 00111 }
| int BandeMatrix::Solve | ( | Vector * | residu | ) | [inline] |
solve the system Ax=b where b is residu parameter and A is current class.
Reimplemented from MyMatrix< BandeMatrix >.
Definition at line 90 of file band_matrix.h.
References MyMatrix< BandeMatrix >::_m, Vector::GetVector(), kl, ku, MyMatrix< BandeMatrix >::matrix, MyMatrix< BandeMatrix >::pivot, and solveBandMatrix().
Here is the call graph for this function:

| int BandeMatrix::zero | ( | ) | [inline] |
Definition at line 95 of file band_matrix.h.
References MyMatrix< BandeMatrix >::_m, dim, and MyMatrix< BandeMatrix >::matrix.
Referenced by BandeMatrix().
int BandeMatrix::dim [private] |
Definition at line 115 of file band_matrix.h.
Referenced by BandeMatrix(), operator()(), PrintCompressed(), and zero().
int BandeMatrix::kl [private] |
int BandeMatrix::ku [private] |
double BandeMatrix::nulle [private] |
1.5.2