This example shows how to randomly select a given number of elements from a GenSeq::CoprimeIntegers sequence.
#include "latbuilder/GenSeq/CoprimeIntegers.h"
#include "latbuilder/Traversal.h"
#include "latbuilder/LFSR113.h"
#include "latbuilder/TextStream.h"
#include <iostream>
using TextStream::operator<<;
int main()
{
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;
}