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

Go to the source code of this file.

Functions

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

Function Documentation

template<CPPL_INT l>
std::ostream& operator<< ( std::ostream &  s,
const zcovector_small< l > &  A 
)
inline

operator<<

Definition at line 63 of file zcovector_small-functions.hpp.

References i().

64 {CPPL_VERBOSE_REPORT;
65  s << std::setiosflags(std::ios::showpos);
66  for(CPPL_INT i=0; i<l; i++){
67  s << A(i) << std::endl;
68  }
69  return s;
70 }
_dgematrix i(const _dgbmatrix &mat)
template<CPPL_INT l>
zrovector_small<l> t ( const zcovector_small< l > &  A)
inline

return transposed zrovector_small

Definition at line 149 of file zcovector_small-functions.hpp.

References i().

150 {CPPL_VERBOSE_REPORT;
152  for(CPPL_INT i=0; i<l; i++){
153  X(i) =A(i);
154  }
155  return X;
156 }
_dgematrix i(const _dgbmatrix &mat)
Samll Complex Double-precision Row Vector Class.
template<CPPL_INT l>
comple nrm2 ( const zcovector_small< l > &  A)
inline

return its 2-norm

Definition at line 161 of file zcovector_small-functions.hpp.

References i().

162 {CPPL_VERBOSE_REPORT;
163  comple v(0);
164  for(CPPL_INT i=0; i<l; i++){
165  v+=A(i)*A(i);
166  }
167  return std::sqrt(v);
168 }
_dgematrix i(const _dgbmatrix &mat)
template<CPPL_INT l>
void idamax ( CPPL_INT &  K,
const zcovector_small< l > &  A 
)
inline

return index of the maximum component

Definition at line 173 of file zcovector_small-functions.hpp.

Referenced by damax().

174 {CPPL_VERBOSE_REPORT;
175  comple max(-1.);
176  for(int k=0; k<l; k++){
177  if( max<fabs(A(k)) ){
178  K=k;
179  max =fabs(A(k));
180  }
181  }
182  return;
183 }
template<CPPL_INT l>
comple damax ( const zcovector_small< l > &  A)
inline

return the maximum component

Definition at line 188 of file zcovector_small-functions.hpp.

References idamax().

189 {CPPL_VERBOSE_REPORT;
190  CPPL_INT k(0);
191  idamax(k,A);
192  return A(k);
193 }
void idamax(CPPL_INT &K, const zcovector_small< l > &A)
template<CPPL_INT l>
zcovector_small<l>& operator+= ( zcovector_small< l > &  A,
const zcovector_small< l > &  B 
)
inline

zcovector_small+=zcovector_small operator

Definition at line 217 of file zcovector_small-functions.hpp.

References i().

218 {CPPL_VERBOSE_REPORT;
219  for(CPPL_INT i=0; i<l; i++){
220  A(i) +=B(i);
221  }
222  return A;
223 }
_dgematrix i(const _dgbmatrix &mat)
template<CPPL_INT l>
zcovector_small<l>& operator-= ( zcovector_small< l > &  A,
const zcovector_small< l > &  B 
)
inline

zcovector_small-=zcovector_small operator

Definition at line 228 of file zcovector_small-functions.hpp.

References i().

229 {CPPL_VERBOSE_REPORT;
230  for(CPPL_INT i=0; i<l; i++){
231  A(i) -=B(i);
232  }
233  return A;
234 }
_dgematrix i(const _dgbmatrix &mat)
template<CPPL_INT l>
zcovector_small<l>& operator*= ( zcovector_small< l > &  A,
const double &  v 
)
inline

zcovector_small*=double operator

Definition at line 239 of file zcovector_small-functions.hpp.

References i().

240 {CPPL_VERBOSE_REPORT;
241  for(CPPL_INT i=0; i<l; i++){
242  A(i) *=v;
243  }
244  return A;
245 }
_dgematrix i(const _dgbmatrix &mat)
template<CPPL_INT l>
zcovector_small<l>& operator*= ( zcovector_small< l > &  A,
const comple &  v 
)
inline

zcovector_small*=comple operator

Definition at line 250 of file zcovector_small-functions.hpp.

References i().

251 {CPPL_VERBOSE_REPORT;
252  for(CPPL_INT i=0; i<l; i++){
253  A(i) *=v;
254  }
255  return A;
256 }
_dgematrix i(const _dgbmatrix &mat)
template<CPPL_INT l>
zcovector_small<l>& operator/= ( zcovector_small< l > &  A,
const double &  v 
)
inline

zcovector_small/=double operator

Definition at line 261 of file zcovector_small-functions.hpp.

References i().

262 {CPPL_VERBOSE_REPORT;
263  for(CPPL_INT i=0; i<l; i++){
264  A(i) /=v;
265  }
266  return A;
267 }
_dgematrix i(const _dgbmatrix &mat)
template<CPPL_INT l>
zcovector_small<l>& operator/= ( zcovector_small< l > &  A,
const comple &  v 
)
inline

zcovector_small/=comple operator

Definition at line 272 of file zcovector_small-functions.hpp.

References i().

273 {CPPL_VERBOSE_REPORT;
274  for(CPPL_INT i=0; i<l; i++){
275  A(i) /=v;
276  }
277  return A;
278 }
_dgematrix i(const _dgbmatrix &mat)
template<CPPL_INT l>
const zcovector_small<l>& operator+ ( const zcovector_small< l > &  A)
inline

unary + operator

Definition at line 287 of file zcovector_small-functions.hpp.

288 {CPPL_VERBOSE_REPORT;
289  return A;
290 }
template<CPPL_INT l>
zcovector_small<l> operator- ( const zcovector_small< l > &  A)
inline

unary - operator

Definition at line 295 of file zcovector_small-functions.hpp.

References i().

296 {CPPL_VERBOSE_REPORT;
298  for(CPPL_INT i=0; i<l; i++){
299  X(i) =-A(i);
300  }
301  return X;
302 }
_dgematrix i(const _dgbmatrix &mat)
Samll Complex Double-precision Column Vector Class.
template<CPPL_INT l>
zcovector_small<l> operator+ ( const zcovector_small< l > &  A,
const zcovector_small< l > &  B 
)
inline

zcovector_small+zcovector_small operator

Definition at line 311 of file zcovector_small-functions.hpp.

References i().

312 {CPPL_VERBOSE_REPORT;
314  for(CPPL_INT i=0; i<l; i++){
315  X(i) =A(i)+B(i);
316  }
317  return X;
318 }
_dgematrix i(const _dgbmatrix &mat)
Samll Complex Double-precision Column Vector Class.
template<CPPL_INT l>
zcovector_small<l> operator- ( const zcovector_small< l > &  A,
const zcovector_small< l > &  B 
)
inline

zcovector_small-zcovector_small operator

Definition at line 323 of file zcovector_small-functions.hpp.

References i().

324 {CPPL_VERBOSE_REPORT;
326  for(CPPL_INT i=0; i<l; i++){
327  X(i) =A(i)-B(i);
328  }
329  return X;
330 }
_dgematrix i(const _dgbmatrix &mat)
Samll Complex Double-precision Column Vector Class.
template<CPPL_INT n>
zcovector_small<n> operator* ( const zcovector_small< n > &  A,
const double &  v 
)
inline

zcovector_small*double operator

Definition at line 339 of file zcovector_small-functions.hpp.

References i().

340 {CPPL_VERBOSE_REPORT;
342  for(CPPL_INT i=0; i<n; i++){
343  C(i) =A(i)*v;
344  }
345  return C;
346 }
_dgematrix i(const _dgbmatrix &mat)
Samll Complex Double-precision Column Vector Class.
template<CPPL_INT n>
zcovector_small<n> operator* ( const zcovector_small< n > &  A,
const comple &  v 
)
inline

zcovector_small*comple operator

Definition at line 351 of file zcovector_small-functions.hpp.

References i().

352 {CPPL_VERBOSE_REPORT;
354  for(CPPL_INT i=0; i<n; i++){
355  C(i) =A(i)*v;
356  }
357  return C;
358 }
_dgematrix i(const _dgbmatrix &mat)
Samll Complex Double-precision Column Vector Class.
template<CPPL_INT m, CPPL_INT n>
zgematrix_small<m,n> operator* ( const zcovector_small< m > &  A,
const zrovector_small< n > &  B 
)
inline

zcovector_small*zrovector_small operator

Definition at line 363 of file zcovector_small-functions.hpp.

References i().

364 {CPPL_VERBOSE_REPORT;
366  for(CPPL_INT i=0; i<m; i++){
367  for(CPPL_INT j=0; j<n; j++){
368  mat(i,j) =A(i)*B(j);
369  }
370  }
371  return mat;
372 }
_dgematrix i(const _dgbmatrix &mat)
Samll Complex Double-precision General Dence Matrix Class.
template<CPPL_INT n>
zcovector_small<n> operator/ ( const zcovector_small< n > &  A,
const double &  v 
)
inline

zcovector_small/double operator

Definition at line 381 of file zcovector_small-functions.hpp.

References i().

382 {CPPL_VERBOSE_REPORT;
384  for(CPPL_INT i=0; i<n; i++){
385  C(i) =A(i)/v;
386  }
387  return C;
388 }
_dgematrix i(const _dgbmatrix &mat)
Samll Complex Double-precision Column Vector Class.
template<CPPL_INT n>
zcovector_small<n> operator/ ( const zcovector_small< n > &  A,
const comple &  v 
)
inline

zcovector_small/comple operator

Definition at line 393 of file zcovector_small-functions.hpp.

References i().

394 {CPPL_VERBOSE_REPORT;
396  for(CPPL_INT i=0; i<n; i++){
397  C(i) =A(i)/v;
398  }
399  return C;
400 }
_dgematrix i(const _dgbmatrix &mat)
Samll Complex Double-precision Column Vector Class.
template<CPPL_INT l>
comple operator% ( const zcovector_small< l > &  A,
const zcovector_small< l > &  B 
)
inline

zcovector_smallzcovector_small (inner product) operator

Definition at line 409 of file zcovector_small-functions.hpp.

References i().

410 {CPPL_VERBOSE_REPORT;
411  comple v(0.);
412  for(CPPL_INT i=0; i<l; i++){
413  v +=A(i)*B(i);
414  }
415  return v;
416 }
_dgematrix i(const _dgbmatrix &mat)
template<CPPL_INT l>
zcovector_small<l> hadamard ( const zcovector_small< l > &  A,
const zcovector_small< l > &  B 
)
inline

Hadamard product

Definition at line 425 of file zcovector_small-functions.hpp.

References i().

426 {CPPL_VERBOSE_REPORT;
428  for(CPPL_INT i=0; i<l; i++){
429  C(i) =A(i)*B(i);
430  }
431  return C;
432 }
_dgematrix i(const _dgbmatrix &mat)
Samll Complex Double-precision Column Vector Class.