42 #ifndef __Teuchos_MatrixMarket_assignScalar_hpp
43 #define __Teuchos_MatrixMarket_assignScalar_hpp
51 namespace MatrixMarket {
59 template<class Scalar, bool isComplex=Teuchos::ScalarTraits<Scalar>::isComplex>
69 template<
class RealType>
83 #ifdef HAVE_TEUCHOS_COMPLEX
86 template<
class MagType>
87 class ScalarAssigner<std::complex<MagType>, true> {
90 assign (std::complex<MagType>& val,
94 val = std::complex<MagType> (real, imag);
97 #endif // HAVE_TEUCHOS_COMPLEX
105 template<
class Scalar>
118 #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.