mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
improved selftest for Eigen::Complex -- mainly a documentation of what does not work
This commit is contained in:
@@ -210,8 +210,20 @@ operator<< (std::basic_ostream<charT,traits>& ostr, const Complex<T>& rhs)
|
||||
template<class T> Complex<T> sqrt (const Complex<T>&x){return sqrt(ei_to_std(x));}
|
||||
template<class T> Complex<T> tan (const Complex<T>&x){return tan(ei_to_std(x));}
|
||||
template<class T> Complex<T> tanh (const Complex<T>&x){return tanh(ei_to_std(x));}
|
||||
}
|
||||
|
||||
template<typename _Real> struct NumTraits<Complex<_Real> >
|
||||
{
|
||||
typedef _Real Real;
|
||||
typedef Complex<_Real> FloatingPoint;
|
||||
enum {
|
||||
IsComplex = 1,
|
||||
HasFloatingPoint = NumTraits<Real>::HasFloatingPoint,
|
||||
ReadCost = 2,
|
||||
AddCost = 2 * NumTraits<Real>::AddCost,
|
||||
MulCost = 4 * NumTraits<Real>::MulCost + 2 * NumTraits<Real>::AddCost
|
||||
};
|
||||
};
|
||||
}
|
||||
#endif
|
||||
/* vim: set filetype=cpp et sw=2 ts=2 ai: */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user