CPPLapack
 All Classes Files Functions Variables Friends Pages
Functions
double-dgbmatrix.hpp File Reference

Go to the source code of this file.

Functions

_dgbmatrix operator* (const double &d, const dgbmatrix &mat)
 

Function Documentation

_dgbmatrix operator* ( const double &  d,
const dgbmatrix mat 
)
inline

double*dgbmatrix operator

Definition at line 3 of file double-dgbmatrix.hpp.

References _(), dgbmatrix::array, i(), dgbmatrix::kl, dgbmatrix::ku, dgbmatrix::m, and dgbmatrix::n.

4 {CPPL_VERBOSE_REPORT;
5  dgbmatrix newmat(mat.m, mat.n, mat.kl, mat.ku);
6 
7  const CPPL_INT size =(mat.kl+mat.ku+1)*mat.n;
8  for(CPPL_INT i=0; i<size; i++){
9  newmat.array[i] =d*mat.array[i];
10  }
11 
12  return _(newmat);
13 }
CPPL_INT m
matrix row size
Definition: dgbmatrix.hpp:9
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT kl
lower band width
Definition: dgbmatrix.hpp:11
CPPL_INT ku
upper band width
Definition: dgbmatrix.hpp:12
double * array
1D array to store matrix data
Definition: dgbmatrix.hpp:13
Real Double-precision General Band Matrix Class.
Definition: dgbmatrix.hpp:3
CPPL_INT n
matrix column size
Definition: dgbmatrix.hpp:10
_dcovector _(dcovector &vec)