This change has actually been extracted from a change work in progress I4fe423834b8131fb122251892c98228a6e08ba25
Change-Id: I52568fa09da2ea22be7f8bfe9676b7cd73c31fa4
And, use C++ style casts and use float math functions rather than double ones to save memory space.
Also, stop using FloatMath and NativeUtils as standard Math methods are faster now.
See http://code.google.com/p/android/issues/detail?id=36199 and https://android-review.googlesource.com/40700
multi-project commit with I4259fb5ab8a15ac5760a7f04fc8f4c860529f04a
Change-Id: I0b81cff8c91769f7559a59b9528c75a5aabb4211
This needs the matching A119b change to not break the build.
The array is passed, but not used yet.
Bug: 6166228
Change-Id: Ia91d658461d989ee8c94e9b31bb06f4a36f4c5b6
The fact that prediction does not accept a null argument is an
implementation detail, it should not be visible to Java code.
Change-Id: I3a156b323b6db9353de898d33f3f7c81751cecb1
Stop storing an int in each of the different class types, and
just store a string in the top class.
Change-Id: I2af1832743e6fe78e5c1364f6d9cc21252bf5831
Passing the position will not allow us a reasonable lookup
time. Replace this with a map and bloom filter for very fast
lookup.
Bug: 6313806
Change-Id: I3a61c0001cbc987c1c3c7b8df635d4590a370144
We don't want to do a linear search on each terminal when there
may be 100+ bigrams for a given word because that would be
disastrous for performance. Also, we need to resolve each bigram
address anyway.
This change resolves the addresses at first and puts them in a
balanced tree so that lookup will be O(log(n)).
Bug: 6313806
Change-Id: Ibf088035870b9acb41e948f0ab7af4726f2cee24
The position itself is still a const int = 0 until we have the previous
word passed to the function. This basically does the plumbing.
Bug: 6313806
Change-Id: Ib58995f334fe93e3ff5704d7c79f332017f101ac
We need to get the bigrams during the call to getSuggestions for
bug#6313806. We already give an int[] to getSuggestions and we
wanted to get rid of char[]'s anyway because it doesn't work with
surrogate pairs, so here we go.
Bug: 6313806
Change-Id: I56ce99f1db6b3302cdf42f0527343bded837091e