nmpp
tcmplx_spec.h
1
2// //
3// Header file of template class of complex numbers //
4// //
5// //
7
8#ifndef _TCMPLX_CPEC_H_INCLUDED_
9#define _TCMPLX_CPEC_H_INCLUDED_
10
11#include <nmtl.h>
12
13
14
15//------- Z>>=y -----------------------------------------------------------
16template<>
17cmplx<double>& cmplx<double>::operator>>= (const int Shr);
18//{
19// double n=pow((double)2,Shr);
20// re/=n;
21// im/=n;
22// return (*this);
23//}
24/*
25//------- Z=X>>y -----------------------------------------------------------
26cmplx<double> cmplx<double>::operator>> (const int y) const
27{
28 cmplx<T> z(*this);
29 z>>=y;
30 return z;
31}*/
32//------- Z<<=y -----------------------------------------------------------
33template<>
34cmplx<double>& cmplx<double>::operator<<= (const int Shl);
35//{
36// double n=pow((double)2,Shl);
37// re*=n;
38// im*=n;
39// return (*this);
40//}
41/*
42//------- Z=X<<y -----------------------------------------------------------
43cmplx<double> cmplx<double>::operator<< (const int y) const
44{
45 cmplx<T> z(*this);
46 z<<=y;
47 return z;
48}
49*/
50//------------ Z=Y --------------------------------------------------
51/*
52template <class T> cmplx<T>::operator cmplx<double> ()
53{
54 cmplx<Double> DblComplex;
55 DblComplex.re=re;
56 DblComplex.im=im;
57 return (DblComplex);
58}
59*/
60
61#endif