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

Method unite

gecode/int/sorted/sortsup.hpp:214–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212 }
213
214 forceinline void
215 OfflineMin::unite(int a, int b, int c){
216 // c is the union of a and b
217 int ra = sequence[a].root;
218 int rb = sequence[b].root;
219 int large = rb;
220 int small = ra;
221 if (sequence[ra].rank > sequence[rb].rank) {
222 large = ra;
223 small = rb;
224 }
225 sequence[small].parent = large;
226 sequence[large].rank += sequence[small].rank;
227 sequence[large].name = c;
228 sequence[c].root = large;
229 }
230
231 forceinline void
232 OfflineMin::makeset(void){

Callers 2

gloverFunction · 0.80
revgloverFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected