This example shows how to instantiate an ExhaustiveSearch task to search for the best merit among all possible nets.
This example shows how to instantiate an ExhaustiveSearch task to search for the best merit among all possible nets.
#include <iostream>
#include <memory>
#include "netbuilder/FigureOfMerit/CoordUniformFigureOfMerit.h"
#include "netbuilder/Task/ExhaustiveSearch.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);
auto task = std::make_unique<ExhaustiveSearch<NetConstruction::SOBOL, EmbeddingType::UNILEVEL>>(s, size, std::move(figure));
std::cout << task->format();
task->execute();
std::cout << "Best net:" << std::endl;
std::cout << task->bestNet().format() << std::endl;
std::cout << "Merit value: " << task->bestMeritValue() << std::endl;
}
This file contains the base classes for digital nets in base 2.
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.
Standard tasks that can be performed by LatBuilder.
Definition libtut_net.dox:202
NetBuilder namespace.
Definition libtut_net.dox:17
size_t Dimension
Scalar integer type for dimension.
Definition Types.h:52
Digital net construction traits.
Definition NetConstructionTraits.h:77