Merge "refactor space proximity"
This commit is contained in:
commit
64cc10769f
2 changed files with 7 additions and 0 deletions
|
@ -1185,6 +1185,11 @@ float ProximityInfoState::getMostProbableString(int *const codePointBuf) const {
|
||||||
return sumLogProbability;
|
return sumLogProbability;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ProximityInfoState::hasSpaceProximity(const int index) const {
|
||||||
|
ASSERT(0 <= index && index < mSampledInputSize);
|
||||||
|
return mProximityInfo->hasSpaceProximity(getInputX(index), getInputY(index));
|
||||||
|
}
|
||||||
|
|
||||||
// Returns a probability of mapping index to keyIndex.
|
// Returns a probability of mapping index to keyIndex.
|
||||||
float ProximityInfoState::getProbability(const int index, const int keyIndex) const {
|
float ProximityInfoState::getProbability(const int index, const int keyIndex) const {
|
||||||
ASSERT(0 <= index && index < mSampledInputSize);
|
ASSERT(0 <= index && index < mSampledInputSize);
|
||||||
|
|
|
@ -146,6 +146,8 @@ class ProximityInfoState {
|
||||||
return mSampledInputYs[index];
|
return mSampledInputYs[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool hasSpaceProximity(const int index) const;
|
||||||
|
|
||||||
int getLengthCache(const int index) const {
|
int getLengthCache(const int index) const {
|
||||||
return mLengthCache[index];
|
return mLengthCache[index];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue