Square lattice helpers. More...
Classes | |
struct | syten::SQL::Helpers::InvalidCoordinate |
Thrown if an invalid coordinate is passed into a mapping function. More... | |
Namespaces | |
namespace | syten |
Syten namespace. | |
namespace | syten::SQL |
Contains functions dealing with square lattices. | |
namespace | syten::SQL::Helpers |
Contains helper functions for square lattices. | |
namespace | syten::SQL::Lat |
Contains lattice generators for square lattices. | |
Macros | |
#define | SYTEN_SQL_DEFAULT_MAP "Z" |
The current default map, only change together with SYTEN_SQL_MAPS. More... | |
#define | SYTEN_SQL_MAPS |
Help text listing valid 2D→1D mappings with the current default map defined in SYTEN_SQL_DEFAULT_MAP. More... | |
Typedefs | |
typedef Index(* | syten::SQL::Helpers::MappingFunction) (int x, int y, int l, int w) |
Type of a function mapping from 2D coordinates (x,y) and a lattice size (l,w) onto a 1D offset. More... | |
Enumerations | |
enum class | syten::SQL::Helpers::Map { Z , S , M2 , Zx , M2x , Spiral } |
Valid 2D→1D mappings. More... | |
Functions | |
MappingFunction | syten::SQL::Helpers::decideMap (Map const &m) |
Given a mapping specifier, return the appropriate mapping function. More... | |
MappingFunction | syten::SQL::Helpers::decideMap (std::string const &s) |
Given a mapping specifier, return the appropriate mapping function. More... | |
void | syten::SQL::Helpers::printMapping (int l, int w, int b, int s, std::function< Index(int, int)> coord, std::ostream &out) |
Print a mapping to a stream. More... | |
2D→1D mappers for different snake variants. | |
Index | syten::SQL::Helpers::mapM2 (int x, int y, int l, int w) |
Meandering map (2 sites): More... | |
Index | syten::SQL::Helpers::mapM2x (int x, int y, int l, int w) |
Meandering map flipped (2 sites): More... | |
Index | syten::SQL::Helpers::mapS (int x, int y, int l, int w) |
Snake-like map. More... | |
Index | syten::SQL::Helpers::mapSpiral (int x, int y, int l, int w) |
Spiral map: More... | |
Index | syten::SQL::Helpers::mapZ (int x, int y, int l, int w) |
Z-like map: More... | |
Index | syten::SQL::Helpers::mapZx (int x, int y, int l, int w) |
Z-like map; x and y exchanged: More... | |
Square lattice helpers.