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

Method hasAtom

gecode/flatzinc/ast.hh:320–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318 }
319
320 inline bool
321 Node::hasAtom(const std::string& id) {
322 if (Array* a = dynamic_cast<Array*>(this)) {
323 for (int i=a->a.size(); i--;)
324 if (Atom* at = dynamic_cast<Atom*>(a->a[i]))
325 if (at->id == id)
326 return true;
327 } else if (Atom* a = dynamic_cast<Atom*>(this)) {
328 return a->id == id;
329 }
330 return false;
331 }
332
333 inline bool
334 Node::isCall(const std::string& id) {

Callers 2

yyparseFunction · 0.80
ann2iplMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected