Пример #1
0
void mean_quartic_displacement<dimension, float_type>::operator() (
    sample_type const& first
  , sample_type const& second
  , accumulator<result_type>& result
)
{
    accumulator<result_type> acc;
    typename sample_type::array_type::const_iterator r1, r2, end = first.data().end();
    for (r1 = first.data().begin(), r2 = second.data().begin(); r1 != end; ++r1, ++r2) {
        // accumulate quartic displacement
        acc(correlate_function_type()(*r1, *r2));
    }
    result(acc);
}
Пример #2
0
static std::size_t wrap_nparticle(sample_type const& self)
{
    return self.data().size();
}