20 #ifndef __MATRICE_HPP_
21 #define __MATRICE_HPP_
23 #include "headcpp.hpp"
71 Matrice (
int size1,
int size2 ) ;
142 double&
set(
int i,
int j) ;
164 void set_band (
int up,
int low)
const ;
221 ostream& operator<<(ostream& ,
const Matrice& ) ;
224 Matrice operator+ (
const Matrice&,
const Matrice& ) ;
225 Matrice operator- (
const Matrice&,
const Matrice& ) ;
226 Matrice operator- (
const Matrice& ) ;
227 Matrice operator* (
const Matrice&,
double ) ;
228 Matrice operator* (
double,
const Matrice& ) ;
229 Matrice operator* (
const Matrice&,
const Matrice& ) ;
230 Matrice operator/ (
const Matrice&,
double ) ;
233 #define F77_dswap dswap_
234 #define F77_dgbtrf dgbtrf_
235 #define F77_dgbtrs dgbtrs_
236 #define F77_dgetrf dgetrf_
237 #define F77_dgetrs dgetrs_
238 #define F77_dgeev dgeev_
241 void F77_dgbtrf(
int*,
int*,
int*,
int*,
double[],
int*,
int[],
int *) ;
242 void F77_dgbtrs(
char*,
int*,
int*,
int*,
int*,
243 double[],
int*,
int[],
double [],
int*,
int *) ;
244 void F77_dgetrf(
int*,
int*,
double[],
int*,
int[],
int *) ;
245 void F77_dgetrs(
char*,
int*,
int*,
double[],
int*,
int[],
double [],
int*,
int* ) ;
246 void F77_dgeev(
char*,
char*,
int*,
double[],
int*,
double[],
double[],
247 double[],
int*,
double[],
int*,
double[],
int*,
int*) ;
Class for storing the dimensions of an array.
void copy_inside(int i, int j, const Matrice &so)
Copies the elements of so inside the matrice, starting at the position .
Array< double > & get_array()
Returns the array of matrix elements non const version.
friend ostream & operator<<(ostream &, const Matrice &)
Impression.
int kl
Number of lower-diagonals in the band representation.
void operator/=(double)
Operator /=.
Array< int > * permute
Pointer on the second array of the LU-representation.
Dim_array sizes
Dim_array of dimension 2 containing the size of the matrix.
void operator-=(const Matrice &)
Operator -=.
Array< double > * band
Pointer on the array of the band representation of a square matrix.
Array< double > solve(const Array< double > &sec_membre) const
Solves the linear system represented by the matrix.
Array< double > val_propre() const
Returns the eigenvalues of the matrix, calculated using LAPACK.
Array< double > * lu
Pointer on the first array of the LU-representation.
Matrice transpose() const
Computes the transpose matrix.
double & set(int i, int j)
Read/write of a particuliar element.
friend Matrice operator+(const Matrice &, const Matrice &)
Operator + (binary version)
const Array< double > & get_array() const
Returns the array of matrix elements.
Matrice(int size1, int size2)
Standard constructor.
void operator*=(double)
Operator *=.
Array< double > * get_lu()
Returns a pointer on the lu decomposition.
friend Matrice operator-(const Matrice &, const Matrice &)
Operator - (binary version)
void set_band(int up, int low) const
Calculate the band storage of *std.
Matrice vect_propre() const
Returns the eigenvectors of the matrix, calculated using LAPACK.
friend Matrice operator/(const Matrice &, double)
Operator/.
void operator=(double x)
Sets all the element of *std to x.
Array< double > * std
Pointer on the array of the standard representation.
void del_deriv()
Logical destructor : dellocates the memory of the various used representations.
void operator+=(const Matrice &)
Operator +=.
void set_lu() const
Calculate the LU-representation, assuming the band-storage has been done.
int ku
Number of upper-diagonals in the band representation.
double operator()(int i, int j) const
Read-only of a particuliar element.
void annule()
Sets all the coeficients of the *std to 0.
Array< int > * get_permute()
Returns a pointer on the permutation array.
int get_dim(int i) const
Returns the dimension of the matrix.
friend Matrice operator*(const Matrice &, double)
Operator*.