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

Go to the source code of this file.

Functions

const dgbmatrixoperator+ (const dgbmatrix &mat)
_dgbmatrix operator- (const dgbmatrix &mat)

Function Documentation

const dgbmatrix& operator+ ( const dgbmatrix mat) [inline]

+dgbmatrix operator

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

{VERBOSE_REPORT;
  return mat;
}
_dgbmatrix operator- ( const dgbmatrix mat) [inline]

-dgbmatrix operator

Definition at line 10 of file dgbmatrix-unary.hpp.

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

{VERBOSE_REPORT;
  dgbmatrix newmat(mat.m,mat.n,mat.kl,mat.ku);
  for(long i=0; i<(newmat.kl+newmat.ku+1)*newmat.n; i++){
    newmat.array[i]=-mat.array[i];
  }
  
  return _(newmat);
}
 All Classes Files Functions Variables Friends