CPPLapack
 All Classes Files Functions Variables Friends
Functions
zrovector_small-functions.hpp File Reference

Go to the source code of this file.

Functions

template<long l>
std::ostream & operator<< (std::ostream &s, const zrovector_small< l > &A)
template<long n>
zcovector_small< n > t (const zrovector_small< n > &A)
template<long l>
double nrm2 (const zrovector_small< l > &A)
template<long l>
void idamax (long &K, const zrovector_small< l > &A)
template<long l>
comple damax (const zrovector_small< l > &A)
template<long l>
zrovector_small< l > colon (const zrovector_small< l > &A, const zrovector_small< l > &B)
template<long l>
zrovector_small< l > & operator+= (zrovector_small< l > &A, const zrovector_small< l > &B)
template<long l>
zrovector_small< l > & operator-= (zrovector_small< l > &A, const zrovector_small< l > &B)
template<long l>
zrovector_small< l > & operator*= (zrovector_small< l > &A, const comple &d)
template<long l>
zrovector_small< l > & operator/= (zrovector_small< l > &A, const comple &d)
template<long l>
const zrovector_small< l > & operator+ (const zrovector_small< l > &A)
template<long l>
zrovector_small< l > operator- (const zrovector_small< l > &A)
template<long l>
zrovector_small< l > operator+ (const zrovector_small< l > &A, const zrovector_small< l > &B)
template<long l>
zrovector_small< l > operator- (const zrovector_small< l > &A, const zrovector_small< l > &B)
template<long l>
comple operator* (const zrovector_small< l > &A, const zcovector_small< l > &B)
template<long m, long n>
zrovector_small< n > operator* (const zrovector_small< m > &A, const zgematrix_small< m, n > &B)
template<long l>
zrovector_small< l > operator* (const zrovector_small< l > &A, const zhematrix_small< l > &B)
template<long l>
zrovector_small< l > operator* (const zrovector_small< l > &A, const comple &v)
template<long l>
zrovector_small< l > operator/ (const zrovector_small< l > &A, const comple &v)

Function Documentation

template<long l>
std::ostream& operator<< ( std::ostream &  s,
const zrovector_small< l > &  A 
) [inline]

Definition at line 45 of file zrovector_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  s << std::setiosflags(std::ios::showpos);
  for(long i=0; i<l; i++){
    s << " " << A(i) << std::flush;
  }
  s << std::endl;
  return s;
}
template<long n>
zcovector_small<n> t ( const zrovector_small< n > &  A) [inline]

Definition at line 132 of file zrovector_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zcovector_small<n> X;
  for(long i=0; i<n; i++){
    X(i)=A(i);
  }
  return X;
}
template<long l>
double nrm2 ( const zrovector_small< l > &  A) [inline]

Definition at line 144 of file zrovector_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  double v(0);
  for(long i=0; i<l; i++){
    v+=A(i)*A(i);
  }
  return sqrt(v);
}
template<long l>
void idamax ( long &  K,
const zrovector_small< l > &  A 
) [inline]

Definition at line 156 of file zrovector_small-functions.hpp.

{VERBOSE_REPORT;
  double max(-1.);
  for(int k=0; k<l; k++){
    if( max<fabs(A(k)) ){
      K=k;
      max =fabs(A(k));
    }
  }
  return;
}
template<long l>
comple damax ( const zrovector_small< l > &  A) [inline]

Definition at line 171 of file zrovector_small-functions.hpp.

References idamax().

{VERBOSE_REPORT;
  long k(0);
  idamax(k,A);
  return A(k);
}
template<long l>
zrovector_small<l> colon ( const zrovector_small< l > &  A,
const zrovector_small< l > &  B 
) [inline]

Definition at line 181 of file zrovector_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zrovector_small<l> C;
  for(long i=0; i<l; i++){
    C(i) =A(i)*B(i);
  }
  return C;
}
template<long l>
zrovector_small<l>& operator+= ( zrovector_small< l > &  A,
const zrovector_small< l > &  B 
) [inline]

Definition at line 218 of file zrovector_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  for(long i=0; i<l; i++){
    A(i) +=B(i);
  }
  return A;
}
template<long l>
zrovector_small<l>& operator-= ( zrovector_small< l > &  A,
const zrovector_small< l > &  B 
) [inline]

Definition at line 229 of file zrovector_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  for(long i=0; i<l; i++){
    A(i) -=B(i);
  }
  return A;
}
template<long l>
zrovector_small<l>& operator*= ( zrovector_small< l > &  A,
const comple &  d 
) [inline]

Definition at line 240 of file zrovector_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  for(long i=0; i<l; i++){
    A(i) *=d;
  }
  return A;
}
template<long l>
zrovector_small<l>& operator/= ( zrovector_small< l > &  A,
const comple &  d 
) [inline]

Definition at line 251 of file zrovector_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  for(long i=0; i<l; i++){
    A(i) /=d;
  }
  return A;
}
template<long l>
const zrovector_small<l>& operator+ ( const zrovector_small< l > &  A) [inline]

unary

Definition at line 266 of file zrovector_small-functions.hpp.

{VERBOSE_REPORT;
  return A;
}
template<long l>
zrovector_small<l> operator- ( const zrovector_small< l > &  A) [inline]

unary

Definition at line 274 of file zrovector_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zrovector_small<l> X;
  for(long i=0; i<l; i++){
    X(i) =-A(i);
  }
  return X;
}
template<long l>
zrovector_small<l> operator+ ( const zrovector_small< l > &  A,
const zrovector_small< l > &  B 
) [inline]

Definition at line 290 of file zrovector_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zrovector_small<l> X;
  for(long i=0; i<l; i++){
    X(i) =A(i)+B(i);
  }
  return X;
}
template<long l>
zrovector_small<l> operator- ( const zrovector_small< l > &  A,
const zrovector_small< l > &  B 
) [inline]

Definition at line 302 of file zrovector_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zrovector_small<l> X;
  for(long i=0; i<l; i++){
    X(i) =A(i)-B(i);
  }
  return X;
}
template<long l>
comple operator* ( const zrovector_small< l > &  A,
const zcovector_small< l > &  B 
) [inline]

Definition at line 314 of file zrovector_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  comple x =0.;
  for(long i=0; i<l; i++){
    x +=A(i)*B(i);
  }
  return x;
}
template<long m, long n>
zrovector_small<n> operator* ( const zrovector_small< m > &  A,
const zgematrix_small< m, n > &  B 
) [inline]

Definition at line 326 of file zrovector_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zrovector_small<n> C(0.);
  for(long j=0; j<n; j++){
    for(long i=0; i<m; i++){
      C(j) +=A(i)*B(i,j);
    }
  }
  return C;
}
template<long l>
zrovector_small<l> operator* ( const zrovector_small< l > &  A,
const zhematrix_small< l > &  B 
) [inline]

Definition at line 340 of file zrovector_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zrovector_small<l> C(0.);
  for(long j=0; j<l; j++){
    for(long i=0; i<j; i++){
      C(j) +=A(i)*B(j,i);
    }
    for(long i=j; i<l; i++){
      C(j) +=A(i)*B(i,j);
    }    
  }
  return C;
}
template<long l>
zrovector_small<l> operator* ( const zrovector_small< l > &  A,
const comple &  v 
) [inline]

Definition at line 357 of file zrovector_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zrovector_small<l> C;
  for(long i=0; i<l; i++){
    C(i) =A(i)*v;
  }
  return C;
}
template<long l>
zrovector_small<l> operator/ ( const zrovector_small< l > &  A,
const comple &  v 
) [inline]

Definition at line 369 of file zrovector_small-functions.hpp.

References i().

{VERBOSE_REPORT;
  zrovector_small<l> C;
  for(long i=0; i<l; i++){
    C(i) =A(i)/v;
  }
  return C;
}
 All Classes Files Functions Variables Friends