24#ifndef quantlib_dicrepancy_statistics_hpp
25#define quantlib_dicrepancy_statistics_hpp
44 template <
class Sequence>
45 void add(
const Sequence& sample,
47 add(sample.begin(),sample.end(),weight);
49 template <
class Iterator>
50 void add(Iterator begin,
57 Real r_ik, r_jk, temp = 1.0;
61 temp *= (1.0 - r_ik*r_ik);
65 for (m=0; m<N-1; m++) {
69 r_ik =
stats_[k].data()[m].first;
72 temp *= (1.0 - std::max(r_ik, r_jk));
81 r_jk =
stats_[k].data()[m].first;
82 temp *= (1.0 - std::max(r_ik, r_jk));
90 temp *= (1.0 - std::max(r_ik, r_jk));
112 "dimension==1 not allowed");
Statistic tool for sequences with discrepancy calculation.
SequenceStatistics::value_type value_type
void add(const Sequence &sample, Real weight=1.0)
void reset(Size dimension=0)
DiscrepancyStatistics(Size dimension)
void add(Iterator begin, Iterator end, Real weight=1.0)
Statistics analysis of N-dimensional (sequence) data.
void add(const Sequence &sample, Real weight=1.0)
void reset(Size dimension=0)
std::vector< statistics_type > stats_
std::vector< typename StatisticsType::value_type > value_type
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
QL_INTEGER Integer
integer number
std::size_t Size
size of a container
Statistics tools for sequence (vector, list, array) samples.