27 CHECK_LE(value, 32767);
36 const std::vector<float>* PrecomputeValueToProbability() {
37 std::vector<float>* result =
new std::vector<float>;
40 for (
int repeat = 0; repeat != 2; ++repeat) {
41 for (
int value = 0; value != 32768; ++
value) {
42 result->push_back(SlowValueToProbability(value));
51 PrecomputeValueToProbability();
54 std::vector<uint16> result;
57 for (
int cell = 1; cell != 32768; ++cell) {
59 odds *
Odds((*kValueToProbability)[cell]))) +
std::vector< uint16 > ComputeLookupTableToApplyOdds(const float odds)
float ProbabilityFromOdds(const float odds)
constexpr float kMinProbability
constexpr float kMaxProbability
float Odds(float probability)
const std::vector< float > *const kValueToProbability
constexpr uint16 kUnknownProbabilityValue
uint16 ProbabilityToValue(const float probability)
constexpr uint16 kUpdateMarker