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

Function isPrefix

contribs/qecode/WorkManager.cc:24–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22
23#include "WorkManager.hh"
24bool isPrefix(vector<int> prefix,vector<int> a) {
25 if (a.size() < prefix.size())
26 return false;
27 else
28 for (unsigned int i=0;i<prefix.size();i++)
29 if (prefix[i] != a[i])
30 return false;
31
32 return true;
33}
34
35WorkPool::WorkPool(WorkComparator* a) {
36 cmp=a;

Callers 2

trashMethod · 0.85
trashWorksMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected