Lines Matching refs:U
35 void Mutate(Unit *U, size_t MaxLen) { in Mutate() argument
37 assert(U->size() <= MaxLen); in Mutate()
38 if (U->empty()) { in Mutate()
40 U->push_back(RandCh()); in Mutate()
43 assert(!U->empty()); in Mutate()
46 if (U->size() > 1) { in Mutate()
47 U->erase(U->begin() + rand() % U->size()); in Mutate()
52 if (U->size() < MaxLen) { in Mutate()
53 U->insert(U->begin() + rand() % U->size(), RandCh()); in Mutate()
56 size_t Idx = rand() % U->size(); in Mutate()
57 (*U)[Idx] = Ch; in Mutate()
62 size_t Idx = rand() % U->size(); in Mutate()
63 (*U)[Idx] = FlipRandomBit((*U)[Idx]); in Mutate()
67 assert(!U->empty()); in Mutate()