MCPcopy Create free account
hub / github.com/Gecode/gecode / pos

Function pos

examples/pentominoes.cpp:881–888  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

879// Symmetry functions
880namespace {
881 int pos(int h, int w, int h1, int w1) {
882 if (!(0 <= h && h < h1) ||
883 !(0 <= w && w < w1)) {
884 std::cerr << "Cannot place (" << h << "," << w
885 << ") on board of size " << h1 << "x" << w1 << std::endl;
886 }
887 return h * w1 + w;
888 }
889 template<class CArray, class Array>
890 void id(CArray t1, int w1, int h1, Array t2, int& w2, int&h2) {
891 w2 = w1; h2 = h1;

Callers 9

printMethod · 0.70
idFunction · 0.70
rot90Function · 0.70
rot180Function · 0.70
rot270Function · 0.70
flipxFunction · 0.70
flipyFunction · 0.70
flipd1Function · 0.70
flipd2Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected