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/JoeKuo.h"
#include "netbuilder/FigureOfMerit/CoordUniformFigureOfMerit.h"
#include "netbuilder/Task/Eval.h"
#include "latticetester/ProductWeights.h"
#include "latbuilder/Kernel/PAlphaPLR.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::PAlphaPLR, EmbeddingType::UNILEVEL>>(std::move(weights), kernel);
std::cout << "JoeKuo Sobol' net in dimension 15 with 2^15 points" << std::endl;
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;
task->reset(std::move(net));
task->execute();
std::cout << "Merit value: " << task->meritValue() << std::endl;
}