Re: [eigen] TriangularViewType& operator/=(const typename internal::traits<MatrixType>::Scalar& other) |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
Dear Gael,
Am 05.09.2016 um 18:17 schrieb Gael Guennebaud:
Hi,
the types TpFloat and NumTraits<TpFloat>::Real should be fully compatible, just like std::complex<T> and T. Currently, we cannot even do:
TpFloat c;
NumTraits<TpFloat>::Real r;
c = r;
After adding a constructor
template< typename Q = T, class = typename boost::enable_if< boost::is_complex<Q>, typename Q::value_type > >
MyType( const MyType < typename Q::value_type>& a ) {};
your mentioned assignment actually compiles.
Including eigensolverH.compute() produces then > 15000 lines of error, so this will take me some time.
So the first step is to make them compatible and/or define NumTraits<TpFloat>::Real to be TpFloatBase ???
Well, that would be in contradiction to < https://eigen.tuxfamily.org/dox/structEigen_1_1NumTraits.html > :
" A typedef Real, giving the "real part" type of T. If T is already real, then Real is just a typedef to T. If T is std::complex<U> then Real is a typedef to U. "
This should be enough to compile with the devel branch.
O.k., I'll try harder.
Best regards,
Peter