CPPLapack
 All Classes Files Functions Variables Friends
Functions
_dcovector-calc.hpp File Reference

Go to the source code of this file.

Functions

drovector t (const _dcovector &covec)
double nrm2 (const _dcovector &vec)
long idamax (const _dcovector &vec)
double damax (const _dcovector &vec)

Function Documentation

drovector t ( const _dcovector covec) [inline]

return a transposed row vector

Definition at line 3 of file _dcovector-calc.hpp.

References _drovector::array, _dcovector::array, _drovector::cap, _dcovector::cap, _dcovector::l, _drovector::l, and _dcovector::nullify().

Referenced by m2q(), and rotate().

{VERBOSE_REPORT;
  _drovector rovec;
  rovec.l =covec.l;
  rovec.cap =covec.cap;
  delete [] rovec.array;
  rovec.array =covec.array;

  covec.nullify();
  return rovec;
}
double nrm2 ( const _dcovector vec) [inline]

return its Euclidean norm

Definition at line 17 of file _dcovector-calc.hpp.

References _dcovector::array, _dcovector::destroy(), and _dcovector::l.

Referenced by inv(), and vt2q().

{VERBOSE_REPORT;
  double val( dnrm2_(vec.l, vec.array, 1) );
  vec.destroy();
  return val;
}
long idamax ( const _dcovector vec) [inline]

return the index of element having the largest absolute value in 0-based numbering system

Definition at line 27 of file _dcovector-calc.hpp.

References _dcovector::array, _dcovector::destroy(), i(), and _dcovector::l.

Referenced by damax(), and idamax().

{VERBOSE_REPORT;
  long i( idamax_(vec.l, vec.array, 1) -1 );
  vec.destroy();
  return i;
}
double damax ( const _dcovector vec) [inline]

return its largest absolute value

Definition at line 36 of file _dcovector-calc.hpp.

References _dcovector::array, _dcovector::destroy(), and _dcovector::l.

Referenced by damax().

{VERBOSE_REPORT;
  double val( vec.array[idamax_(vec.l, vec.array, 1)-1] );
  vec.destroy();
  return val;
}
 All Classes Files Functions Variables Friends