git-svn-id: svn://db.shs.com.ru/pip@181 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2016-02-25 13:47:57 +00:00
parent f559fa93d8
commit 7adfa8d911
6 changed files with 681 additions and 907 deletions

View File

@@ -153,6 +153,20 @@ inline double toDeg(double rad) {return rad * M_180_PI;}
template<typename T>
inline PICout operator <<(PICout s, const complex<T> & v) {s.space(); s.setControl(0, true); s << "(" << v.real() << "; " << v.imag() << ")"; s.restoreControl(); return s;}
//! \relatesalso PIByteArray \brief Store operator
inline PIByteArray & operator <<(PIByteArray & s, complexf v) {float t; t = v.real(); s << t; t = v.imag(); s << t; return s;}
//! \relatesalso PIByteArray \brief Store operator
inline PIByteArray & operator <<(PIByteArray & s, complexd v) {double t; t = v.real(); s << t; t = v.imag(); s << t; return s;}
//! \relatesalso PIByteArray \brief Store operator
inline PIByteArray & operator <<(PIByteArray & s, complexld v) {ldouble t; t = v.real(); s << t; t = v.imag(); s << t; return s;}
//! \relatesalso PIByteArray \brief Restore operator
inline PIByteArray & operator >>(PIByteArray & s, complexf & v) {float t; s >> t; v.real() = t; s >> t; v.imag() = t; return s;}
//! \relatesalso PIByteArray \brief Restore operator
inline PIByteArray & operator >>(PIByteArray & s, complexd & v) {double t; s >> t; v.real() = t; s >> t; v.imag() = t; return s;}
//! \relatesalso PIByteArray \brief Restore operator
inline PIByteArray & operator >>(PIByteArray & s, complexld & v) {ldouble t; s >> t; v.real() = t; s >> t; v.imag() = t; return s;}
void randomize();
// [-1 ; 1]