10 #ifndef __Teuchos_MatrixMarket_assignScalar_hpp
11 #define __Teuchos_MatrixMarket_assignScalar_hpp
19 namespace MatrixMarket {
27 template<class Scalar, bool isComplex=Teuchos::ScalarTraits<Scalar>::isComplex>
37 template<
class RealType>
51 #ifdef HAVE_TEUCHOS_COMPLEX
54 template<
class MagType>
55 class ScalarAssigner<std::complex<MagType>, true> {
58 assign (std::complex<MagType>& val,
62 val = std::complex<MagType> (real, imag);
65 #endif // HAVE_TEUCHOS_COMPLEX
73 template<
class Scalar>
86 #endif // __Teuchos_MatrixMarket_assignScalar_hpp
This structure defines some basic traits for a scalar field type.
Implementation detail of assignScalar().
static void assign(RealType &val, const typename Teuchos::ScalarTraits< RealType >::magnitudeType &real, const typename Teuchos::ScalarTraits< RealType >::magnitudeType &imag)
static void assign(Scalar &val, const typename Teuchos::ScalarTraits< Scalar >::magnitudeType &real, const typename Teuchos::ScalarTraits< Scalar >::magnitudeType &imag)
Defines basic traits for the scalar field type.
void assignScalar(Scalar &val, const typename Teuchos::ScalarTraits< Scalar >::magnitudeType &real, const typename Teuchos::ScalarTraits< Scalar >::magnitudeType &imag)
Definition of Teuchos::as, for conversions between types.