LatNet Builder Manual  2.0.1-11
Software Package for Constructing Highly Uniform Point Sets
Other Examples

Examining the Distribution of Merit Values

In this example, we examine the quantiles of the distribution of various coordinate-uniform figures of merit for ordinary lattice rules.
We use the Boost Accumulators library to configure a quantile accumulator:

using namespace boost::accumulators;
accumulator_set<Real, features<tag::count, tag::min, tag::max, tag::mean, tag::tail_quantile<boost::accumulators::left>>>
acc(tag::tail<boost::accumulators::left>::cache_size = numSamples);
auto meritSeq = latSeqOverCBC.meritSeq(latSeq);
for (const auto& val : meritSeq)
acc(val);

Then, we output the results with:

unsigned int numBins = 20;
printTableRow("# mean:", mean(acc));
printTableRow("prob", "quantile");
printTableRow(0.0, boost::accumulators::min(acc));
for (unsigned int i = 1; i < numBins; i++) {
double p = double(i) / numBins;
Real q = quantile(acc, quantile_probability = p);
printTableRow(p, q);
}
printTableRow(1.0, boost::accumulators::max(acc));

The complete code can be found in quantiles.cc and, when launched with the following arguments:

./quantiles 256 3 P2 product:0.7

it outputs:

# deterministic samples: 4096
# mean: 1.21563290e-01
prob    quantile
0.000   2.15366148e-02
0.050   2.50717127e-02
0.100   2.68374747e-02
0.150   2.87005857e-02
0.200   3.06908041e-02
0.250   3.28597701e-02
0.300   3.56839625e-02
0.350   3.83623012e-02
0.400   4.20254687e-02
0.450   4.43124539e-02
0.500   4.78925054e-02
0.550   5.51690531e-02
0.600   6.17109690e-02
0.650   6.68680728e-02
0.700   7.73000978e-02
0.750   9.27378624e-02
0.800   1.34587125e-01
0.850   1.74460806e-01
0.900   2.00347214e-01
0.950   4.06895746e-01

Here, we computed (exactly) the mean and the quantiles of the distribution of the \(\mathcal P_2\) discrepancy with product weights equal to 0.7 (and an \(\ell_2\) norm) for ordinary lattice rules in dimension 3 with 256 points.

Various options can be used with this program, such as changing the figure of merit to the \(\mathcal R_\alpha\) criterion or changing the weights. One can also increase the dimension or the number of points. If the search space becomes to big, one can switch to random exploration method, for instance here with 100 random lattices:

./quantiles 2^10 10 R1 order-dependent:1 1000