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

Function subset

gecode/iter/ranges-operations.hpp:96–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94
95 template<class I, class J>
96 forceinline bool
97 subset(I& i, J& j) {
98 // Is i subset of j?
99 while (i() && j())
100 if (j.max() < i.min()) {
101 ++j;
102 } else if ((i.min() >= j.min()) && (i.max() <= j.max())) {
103 ++i;
104 } else {
105 return false;
106 }
107 return !i();
108 }
109
110 template<class I, class J>
111 forceinline bool

Callers 2

subsetMethod · 0.50
includesFunction · 0.50

Calls 4

jFunction · 0.85
iFunction · 0.70
maxMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected