Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f32869c6 authored by Satoshi Kataoka's avatar Satoshi Kataoka
Browse files

refactor space proximity

Change-Id: I9629986f77ece9addc3a70371679510d99f2659f
parent bf78e137
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1185,6 +1185,11 @@ float ProximityInfoState::getMostProbableString(int *const codePointBuf) const {
    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.
float ProximityInfoState::getProbability(const int index, const int keyIndex) const {
    ASSERT(0 <= index && index < mSampledInputSize);
+2 −0
Original line number Diff line number Diff line
@@ -146,6 +146,8 @@ class ProximityInfoState {
        return mSampledInputYs[index];
    }

    bool hasSpaceProximity(const int index) const;

    int getLengthCache(const int index) const {
        return mLengthCache[index];
    }