ENH: correct sumProd return type (#1086)

- previously returned scalar, but now return pTraits cmptType
  which is the same as scalarProduct / outerProduct type.
This commit is contained in:
mattijs
2019-02-10 14:31:35 +00:00
committed by Andrew Heather
parent aab644a3fc
commit 7945ca739c
7 changed files with 62 additions and 17 deletions

View File

@ -197,7 +197,11 @@ TMP_UNARY_FUNCTION(Type, minMagSqr)
template<class Type>
scalar sumProd(const UList<Type>& f1, const UList<Type>& f2);
typename pTraits<Type>::cmptType sumProd
(
const UList<Type>& f1,
const UList<Type>& f2
);
template<class Type>
Type sumCmptProd(const UList<Type>& f1, const UList<Type>& f2);
@ -244,7 +248,7 @@ G_UNARY_FUNCTION(scalarMinMax, gMinMaxMag, minMaxMag, minMaxMag)
#undef G_UNARY_FUNCTION
template<class Type>
scalar gSumProd
typename pTraits<Type>::cmptType gSumProd
(
const UList<Type>& f1,
const UList<Type>& f2,