Changeset 3750 in Sophya for trunk/SophyaLib/BaseTools/mutyv.h
- Timestamp:
- Mar 3, 2010, 9:44:38 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/BaseTools/mutyv.h
r3661 r3750 64 64 inline MuTyV & operator= (r_4 v) { typ = MTVFloat; dv = (r_8)v; iv = (int_8)v; dv_im = 0.; return(*this); } 65 65 inline MuTyV & operator= (r_8 v) { typ = MTVFloat; dv = v; iv = (int_8)v; dv_im = 0.; return(*this); } 66 inline MuTyV & operator= (complex<r_4> const& v) { typ = MTVComplex; dv = (r_8)v.real(); dv_im = v.imag();66 inline MuTyV & operator= (complex<r_4> const& v) { typ = MTVComplex; dv = (r_8)v.real(); dv_im = (r_8)v.imag(); 67 67 iv = (int_8)dv; return(*this); } 68 68 inline MuTyV & operator= (complex<r_8> const& v) { typ = MTVComplex; dv = (r_8)v.real(); dv_im = v.imag(); 69 69 iv = (int_8)dv; return(*this); } 70 const char* operator= (const char* s); 71 string const& operator= (string const & s); 72 TimeStamp const& operator= (TimeStamp const & s); 70 #ifdef SO_LDBLE128 71 inline MuTyV & operator= (r_16 v) { typ = MTVFloat; dv = (r_8)v; iv = (int_8)v; dv_im = 0.; return(*this); } 72 inline MuTyV & operator= (complex<r_16> const& v) { typ = MTVComplex; dv = (r_8)v.real(); dv_im = (r_8)v.imag(); 73 iv = (int_8)dv; return(*this); } 74 #endif 75 const char* operator= (const char* s); 76 string const& operator= (string const & s); 77 TimeStamp const& operator= (TimeStamp const & s); 73 78 74 79 inline operator uint_1() const { return((uint_1)iv); } … … 84 89 inline operator complex<r_4>() const { return(complex<r_4>((r_4)dv, (r_4)dv_im)); } 85 90 inline operator complex<r_8>() const { return(complex<r_8>(dv, dv_im)); } 91 #ifdef SO_LDBLE128 92 inline operator r_16() const { return((r_16)dv); } 93 inline operator complex<r_16>() const { return(complex<r_16>((r_16)dv, (r_16)dv_im)); } 94 #endif 86 95 87 88 96 operator string() const ; 97 operator TimeStamp() const ; 89 98 90 99 inline uint_1 Convert(uint_1& x) const { x = (uint_1)iv; return x; } … … 102 111 inline complex<r_8> Convert(complex<r_8> & x) const 103 112 { x = complex< r_8 > (dv, dv_im); return x; } 104 113 #ifdef SO_LDBLE128 114 inline r_16 Convert(r_16& x) const { x = (r_16)dv; return x; } 115 inline complex<r_16> Convert(complex<r_16> & x) const 116 { x = complex< r_16 > ((r_16)dv, (r_16)dv_im); return x; } 117 #endif 105 118 string& Convert(string& x) const ; 106 119 TimeStamp& Convert(TimeStamp& x) const ;
Note:
See TracChangeset
for help on using the changeset viewer.