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

Function spec_size

examples/minesweeper.cpp:281–285  ·  view source on GitHub ↗

Compute the size of a specification

Source from the content-addressed store, hash-verified

279
280 /// Compute the size of a specification
281 int spec_size(const char *s) {
282 int l = std::strlen(s);
283 int res = static_cast<int>(std::sqrt(static_cast<float>(l)));
284 return res;
285 }
286
287 /// Return value at position (\a i,\a j) in the example \a s of size \a n
288 int mineField(const char *s, int n, int i, int j) {

Callers 2

MineSweeperMethod · 0.85
mineFieldFunction · 0.85

Calls 1

sqrtFunction · 0.50

Tested by

no test coverage detected