This example shows how to enumerate integers in the cyclic group of integers modulo \(n\), in the natural group order, that is, using the group generator.
#include "latbuilder/GenSeq/CyclicGroup.h"
#include "latbuilder/TextStream.h"
#include <iostream>
using TextStream::operator<<;
void displaySeq(int base, int power)
{
std::cout << "lattice size: " << base << "^" << power << std::endl;
std::cout << " whole sequence: " << WholeSeq(base, power) << std::endl;
std::cout << " half sequence: " << HalfSeq(base, power) << std::endl;
}
int main()
{
displaySeq(7, 1);
displaySeq(2, 3);
displaySeq(3, 2);
return 0;
}