32 #ifndef VSMC_INTEGRATE_ISINTEGRATE_HPP
33 #define VSMC_INTEGRATE_ISINTEGRATE_HPP
57 const double *hX,
const double *W,
double *Eh)
const
59 if (N == 0 || dim == 0)
68 ::cblas_dgemv(::CblasColMajor, ::CblasNoTrans,
69 static_cast<VSMC_CBLAS_INT>(dim),
70 static_cast<VSMC_CBLAS_INT>(N), 1, hX,
71 static_cast<VSMC_CBLAS_INT>(dim), W, 1, 0, Eh, 1);
73 for (size_type d = 0; d != dim; ++d)
75 for (size_type i = 0; i != N; ++i, ++W) {
76 for (size_type d = 0; d != dim; ++d, ++hX)
77 Eh[d] += (*W) * (*hX);
85 #endif // VSMC_INTEGRATE_ISINTEGRATE_HPP
void operator()(size_type N, size_type dim, const double *hX, const double *W, double *Eh) const
Compute the importance sampling integration.
Compute the importance sampling integration of multivariate variable.
T dot(std::size_t n, const T *x, const T *y)
The dot product.