This is an example of how to use the different sequences of generating vectors.
#include "latbuilder/SizeParam.h"
#include "latbuilder/GenSeq/CyclicGroup.h"
#include "latbuilder/GenSeq/CoprimeIntegers.h"
#include "latbuilder/GenSeq/PowerSeq.h"
#include "latbuilder/GenSeq/Creator.h"
#include "latbuilder/GenSeq/VectorCreator.h"
#include "latbuilder/Traversal.h"
#include "latbuilder/LFSR113.h"
#include "latbuilder/TextStream.h"
#include <iostream>
template <class GENSEQ, class SIZE, typename... ARGS>
void test(const std::vector<SIZE>& init, ARGS&&... args) {
std::cout << "==> " << GENSEQ::name() << std::endl;
for (SIZE size : init) {
using TextStream::operator<<;
std::cout << size << ": " << seq << std::endl;
std::cout << size << ": " << vec << " (vector)" << std::endl;
std::cout << size << ": " << seq2 << " (squared)" << std::endl;
}
}
int main()
{
auto init1 = std::vector<SizeParam<LatType::ORDINARY>>{5, 6, 7, 8, 9, 10, 11, 12};
auto init2 = std::vector<SizeParam<LatType::EMBEDDED>>{{2,5}, {3,3}, {11,1}};
auto init3 = std::vector<SizeParam<LatType::ORDINARY>>{256, 257, 1000};
auto init4 = std::vector<SizeParam<LatType::EMBEDDED>>{{2,8}, {3,5}};
test<CoprimeIntegers<Compress::NONE>>(init1);
test<CoprimeIntegers<Compress::SYMMETRIC>>(init1);
test<CoprimeIntegers<Compress::NONE>>(init2);
test<CoprimeIntegers<Compress::SYMMETRIC>>(init2);
test<CyclicGroup<Compress::NONE>>(init2);
test<CyclicGroup<Compress::SYMMETRIC>>(init2);
test<CoprimeIntegers<Compress::NONE, Traversal::Random<LFSR113>>>(init3, 5);
test<CoprimeIntegers<Compress::SYMMETRIC, Traversal::Random<LFSR113>>>(init3, 5);
test<CyclicGroup<Compress::NONE, Traversal::Random<LFSR113>>>(init4, 5);
test<CyclicGroup<Compress::SYMMETRIC, Traversal::Random<LFSR113>>>(init4, 5);
return 0;
}