Lines Matching refs:random_

156       : keep_initialized_(keep_initialized), random_(random), sampler_(random) {  in MutationSampler()
184 oneof->field(GetRandomIndex(random_, oneof->field_count())); in Sample()
208 {{message, field, GetRandomIndex(random_, field_size + 1)}, in Sample()
212 size_t random_index = GetRandomIndex(random_, field_size); in Sample()
256 RandomEngine* random_; member in protobuf_mutator::__anonb2429a380111::MutationSampler
273 : match_(match), random_(random), sampler_(random) { in DataSourceSampler()
314 GetRandomIndex(random_, field_size)); in Sample()
330 RandomEngine* random_; member in protobuf_mutator::__anonb2429a380111::DataSourceSampler
450 Mutator::Mutator(RandomEngine* random) : random_(random) {} in Mutator()
456 MutationSampler mutation(keep_initialized_, random_, message); in Mutate()
470 DataSourceSampler source(mutation.field(), random_, message); in Mutate()
530 if (int k = GetRandomIndex(random_, field_size2 - j)) { in CrossOverImpl()
535 int keep = GetRandomIndex(random_, field_size2 + 1); in CrossOverImpl()
540 int cross = GetRandomIndex(random_, std::min(keep, remove) + 1); in CrossOverImpl()
542 int k = GetRandomIndex(random_, keep); in CrossOverImpl()
543 int r = keep + GetRandomIndex(random_, remove); in CrossOverImpl()
556 if (GetRandomBool(random_)) in CrossOverImpl()
559 if (GetRandomBool(random_)) { in CrossOverImpl()
568 if (GetRandomBool(random_)) { in CrossOverImpl()
615 int32_t Mutator::MutateInt32(int32_t value) { return FlipBit(value, random_); } in MutateInt32()
617 int64_t Mutator::MutateInt64(int64_t value) { return FlipBit(value, random_); } in MutateInt64()
620 return FlipBit(value, random_); in MutateUInt32()
624 return FlipBit(value, random_); in MutateUInt64()
627 float Mutator::MutateFloat(float value) { return FlipBit(value, random_); } in MutateFloat()
629 double Mutator::MutateDouble(double value) { return FlipBit(value, random_); } in MutateDouble()
635 return (index + 1 + GetRandomIndex(random_, item_count - 1)) % item_count; in MutateEnum()
642 while (!result.empty() && GetRandomBool(random_)) { in MutateString()
643 result.erase(GetRandomIndex(random_, result.size()), 1); in MutateString()
646 while (result.size() < size_increase_hint && GetRandomBool(random_)) { in MutateString()
647 size_t index = GetRandomIndex(random_, result.size() + 1); in MutateString()
648 result.insert(result.begin() + index, GetRandomIndex(random_, 1 << 8)); in MutateString()
654 result.push_back(GetRandomIndex(random_, 1 << 8)); in MutateString()
659 FlipBit(result.size(), reinterpret_cast<uint8_t*>(&result[0]), random_); in MutateString()
666 FixUtf8String(&str, random_); in MutateUtf8String()