MCPcopy Create free account
hub / github.com/csmith-project/csmith / key_to_prob

Method key_to_prob

src/Probabilities.cpp:1134–1143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1132}
1133
1134int DistributionTable::key_to_prob(int key) const
1135{
1136 for (size_t i=0; i<keys_.size(); i++) {
1137 if (keys_[i] == key) {
1138 return probs_[i];
1139 }
1140 }
1141 // 0 probablility for keys not found
1142 return 0;
1143}
1144
1145int DistributionTable::rnd_num_to_key(int rnd) const
1146{

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected