MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / insert

Method insert

Math/Basis Vector.cpp:17–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15 clear();
16 }
17 void insert(T x) {
18 for (int i = B - 1; i >= 0; i--) {
19 if (x >> i & 1) {
20 if (basis[i]) x ^= basis[i];
21 else {
22 basis[i] = x;
23 sz++;
24 break;
25 }
26 }
27 }
28 }
29 // is there any subset having xor = x
30 bool can(T x) {
31 for(int i = B - 1; i >= 0; i--) {

Callers 15

mulFunction · 0.45
mul_xkMethod · 0.45
evalMethod · 0.45
mul_xkMethod · 0.45
mul_xkMethod · 0.45
LinearRecurrenceFunction · 0.45
solveFunction · 0.45
mainFunction · 0.45
mul_xkMethod · 0.45
factorizeFunction · 0.45
mul_xkMethod · 0.45
stirlingFunction · 0.45

Calls

no outgoing calls

Tested by 3

mul_xkMethod · 0.36
LinearRecurrenceFunction · 0.36
factorFunction · 0.36