This example shows how to randomly select a given number of elements from a GenSeq::GeneratingValues sequence.
This example shows how to randomly select a given number of elements from a GenSeq::GeneratingValues sequence.
#include "latbuilder/GenSeq/GeneratingValues.h"
#include "latbuilder/Traversal.h"
#include "latbuilder/LFSR258.h"
#include "latbuilder/TextStream.h"
#include <iostream>
using TextStream::operator<<;
int main()
{
SET_PATH_TO_LATNETBUILDER_FOR_EXAMPLES();
size_t r = 4;
Trav trav(r);
std::cout << "lattice size: " << n
<< " (" << trav.size() << " random samples)" << std::endl;
RandomSeq seq(n, trav);
std::cout << " sequence: " << seq << std::endl;
std::cout << " same sequence: " << seq << std::endl;
seq.randomGenerator().jump();
std::cout << " other sequence: " << seq << std::endl;
}
return 0;
}
This file contains a global variable PATH_TO_LATNETBUILDER_DIR which should always equal the path to ...
Indexed sequence of generating values: -For ordinary lattices: integers coprime with a specified modu...
Definition GeneratingValues.h:48
Random traversal type.
Definition Traversal.h:76
LatBuilder namespace.
Definition libtut_lat.dox:17
unsigned long uInteger
Scalar unsigned integer .
Definition Types.h:40