* For complex vectors, the
* scalar product is implemented
* as $\left<v,w\right>=\sum_i
- * \bar{v_i} w_i$.
+ * v_i \bar{w_i}$.
*/
template <typename Number2>
Number operator * (const Vector<Number2> &V) const;
// operator*(complex<float>,complex<double>)
// is not defined by default
for (unsigned int i=0; i<vec_size; ++i)
- sum += numbers::NumberTraits<Number>::conjugate(val[i]) * Number(v.val[i]);
+ sum += val[i] * Number(numbers::NumberTraits<Number2>::conjugate(v.val[i]));
return sum;
}
if (i%3 == 0)
{
w(i) = std::complex<double> (i+1., i+2.);
- product += 1.*i*std::complex<double> (i+1., i+2.);
+ product += 1.*i*std::conj(std::complex<double> (i+1., i+2.));
}
}
-DEAL::(114444.,116127.) (114444.,-116127.) (114444.,116127.) (114444.,-116127.)
+DEAL::(114444.,-116127.) (114444.,116127.) (114444.,-116127.) (114444.,116127.)
DEAL::OK
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams