1 #ifndef jb_testing_sum_square_hpp 2 #define jb_testing_sum_square_hpp 16 template <
typename container_t>
18 using array_type = container_t;
22 using precision_type =
30 element_type
const* it_ts = ts.data();
31 for (std::size_t i = 0; i != num_timeseries; ++i) {
32 element_type sum2_val = element_type();
33 for (std::size_t j = 0; j !=
nsamples; ++j, ++it_ts) {
34 sum2_val += *it_ts * (*it_ts);
36 sum2[i] = std::abs(sum2_val);
38 return std::move(sum2);
44 #endif // jb_testing_sum_square_hpp typename container_type::value_type element_type
Define the type of the elements in the container.
A time-delay estimator (TDE) is an algorithm to compare two families of timeseries and return the est...
auto sum_square(container_t const &ts)
Compute the sum square of a family of timeseries.
std::size_t nsamples(container_type const &a)
Count the elements in the last dimension of a vector-like container.
std::size_t element_count(container_type const &a)
Count the number of elements for a vector-like container.
The top-level namespace for the JayBeams library.