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

Function one

test/int/linear.cpp:44–49  ·  view source on GitHub ↗

Check whether \a a has only one coefficients

Source from the content-addressed store, hash-verified

42
43 /// Check whether \a a has only one coefficients
44 bool one(const Gecode::IntArgs& a) {
45 for (int i=a.size(); i--; )
46 if (a[i] != 1)
47 return false;
48 return true;
49 }
50
51 /**
52 * \defgroup TaskTestIntLinear Linear constraints

Callers 15

postMethod · 0.70
postMethod · 0.70
postMethod · 0.70
postMethod · 0.70
adviseMethod · 0.50
oneMethod · 0.50
zeroMethod · 0.50
one_noneMethod · 0.50
zeroMethod · 0.50
oneMethod · 0.50
gqMethod · 0.50
eqMethod · 0.50

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected