This example shows how to instantiate an Eval task to compute a figure of merit for a digital net.
This example shows how to instantiate an Eval task to compute a figure of merit for a digital net.
#include <iostream>
#include <memory>
#include "netbuilder/Helpers/JoeKuo.h"
#include "netbuilder/FigureOfMerit/CoordUniformFigureOfMerit.h"
#include "netbuilder/Task/Eval.h"
#include "latticetester/ProductWeights.h"
#include "latbuilder/Kernel/PAlphaTilde.h"
int main(int argc, char** argv)
{
SET_PATH_TO_LATNETBUILDER_FOR_EXAMPLES();
unsigned int alpha = 2;
auto weights = std::make_unique<LatticeTester::ProductWeights>(.7);
auto figure = std::make_unique<CoordUniformFigureOfMerit<LatBuilder::Kernel::PAlphaTilde, EmbeddingType::UNILEVEL>>(std::move(weights), kernel);
std::cout << "JoeKuo Sobol' net in dimension 15 with 2^15 points" << std::endl;
auto net = createPtrToJoeKuoSobolNet(15, 15);
auto task = std::make_unique<Eval>(std::move(net), std::move(figure));
task->execute();
std::cout << "Merit value: " << task->meritValue() << std::endl;
std::cout << "JoeKuo Sobol' net in dimension 15 with 2^15 points" << std::endl;
net = createPtrToJoeKuoSobolNet(15, 15);
task->reset(std::move(net));
task->execute();
std::cout << "Merit value: " << task->meritValue() << std::endl;
}
This file contains a global variable PATH_TO_LATNETBUILDER_DIR which should always equal the path to ...
Definition PAlphaTilde.h:26
Basic type definitions of NetBuilder.
std::unique_ptr< DigitalNet< NetConstruction::SOBOL > > createPtrToJoeKuoSobolNet(Dimension dimension, MatrixSize size)
Constructs a Sobol' net using the direction numbers suggested by Joe and Kuo in rjoe08a.
Standard tasks that can be performed by LatBuilder.
Definition libtut_net.dox:202
NetBuilder namespace.
Definition libtut_net.dox:17