/packages/inputmethods/LatinIME/native/jni/src/utils/ |
H A D | autocorrection_threshold_utils.cpp | 75 const int distance = editDistance(before, beforeLength, after, afterLength); local 87 if (score <= 0 || distance >= afterLength) { 89 // or if the edit distance is larger than or equal to afterLength. 92 // add a weight based on edit distance. 93 const float weight = 1.0f - static_cast<float>(distance) / static_cast<float>(afterLength);
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/ |
H A D | KeyDetector.java | 37 * @param keyHysteresisDistance if the pointer movement distance is smaller than this, the 103 final int distance = key.squaredDistanceToEdge(touchX, touchY); 104 if (distance > minDistance) { 108 if (primaryKey == null || distance < minDistance 110 minDistance = distance;
|
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
H A D | ScrollerHelper.java | 84 // Returns the distance that over the scroll limit. 85 public int startScroll(int distance, int min, int max) { argument 89 int newPosition = Utils.clamp(finalPosition + distance, min, max); 95 return finalPosition + distance - newPosition;
|
H A D | Paper.java | 36 public void overScroll(float distance) { argument 37 distance /= mWidth; // make it relative to width 38 if (distance < 0) { 39 mAnimationLeft.onPull(-distance); 41 mAnimationRight.onPull(distance);
|
H A D | EdgeEffect.java | 180 * @param deltaDistance Change in distance since the last call. Values may be 0 (no change) to 198 float distance = Math.abs(mPullDistance); 200 mEdgeAlpha = mEdgeAlphaStart = Math.max(PULL_EDGE_BEGIN, Math.min(distance, MAX_ALPHA)); 202 HELD_EDGE_SCALE_Y, Math.min(distance * PULL_DISTANCE_EDGE_FACTOR, 1.f));
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/util/ |
H A D | LevenshteinDistance.java | 20 * This class represents the matrix used in the Levenshtein distance algorithm, together 60 * Implementation of Levenshtein distance algorithm. 62 * @return The Levenshtein distance. 77 int distance = distTab[s-1][t] + 1; 81 if (d + 1 < distance ) { 82 distance = d + 1; 87 if (d + cost < distance) { 88 distance = d + cost; 91 distTab[s][t] = distance;
|
/packages/apps/Launcher2/src/com/android/launcher2/ |
H A D | SmoothPagedView.java | 46 public void setDistance(int distance) { argument 47 mTension = distance > 0 ? DEFAULT_TENSION / distance : DEFAULT_TENSION;
|
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/util/ |
H A D | LevenshteinDistanceTest.java | 43 LevenshteinDistance distance = new LevenshteinDistance(sourceTokens, targetTokens); 45 assertEquals(expectedDistance, distance.calculate()); 46 EditOperation[] ops = distance.getTargetOperations();
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/ |
H A D | BogusMoveEventDetector.java | 63 // Accumulated distance from actual and artificial down keys. 84 public void onMoveKey(final int distance) { argument 85 mAccumulatedDistanceFromDownKey += distance;
|
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
H A D | OverScroller.java | 156 * @return The new X offset as an absolute distance from the origin. 165 * @return The new Y offset as an absolute distance from the origin. 183 * @return The start X offset as an absolute distance from the origin. 192 * @return The start Y offset as an absolute distance from the origin. 201 * @return The final X offset as an absolute distance from the origin. 210 * @return The final Y offset as an absolute distance from the origin. 253 * @param newX The new X offset as an absolute distance from the origin. 271 * @param newY The new Y offset as an absolute distance from the origin. 343 * Start scrolling by providing a starting point and the distance to travel. 351 * @param dx Horizontal distance t 682 startScroll(int start, int distance, int duration) argument [all...] |
/packages/apps/TV/common/src/com/android/tv/common/ui/setup/animation/ |
H A D | FadeAndShortSlide.java | 54 int distance); 59 public float getGoneX(ViewGroup sceneRoot, View view, int[] position, int distance) { 63 x = view.getTranslationX() + distance; 65 x = view.getTranslationX() - distance; 73 public float getGoneX(ViewGroup sceneRoot, View view, int[] position, int distance) { 77 x = view.getTranslationX() - distance; 79 x = view.getTranslationX() + distance; 304 * Sets the moving distance in pixel. 306 public void setDistance(int distance) { argument 307 mDistance = distance; 53 getGoneX(ViewGroup sceneRoot, View view, int[] position, int distance) argument [all...] |
/packages/apps/ContactsCommon/src/com/android/contacts/common/util/ |
H A D | MaterialColorMapUtils.java | 121 final float distance = Math.abs(comparedHue - colorHue); 122 if (distance < minimumDistance) { 123 minimumDistance = distance;
|
/packages/apps/Dialer/InCallUI/src/com/android/incallui/ |
H A D | InCallContactInteractions.java | 100 public void setBusinessInfo(Address address, float distance, argument 115 BusinessContextInfo locationInfo = constructLocationInfo(address, distance); 258 * [Straight line distance in miles or kilometers] 262 * @param distance The distance to the location in meters 263 * @return A BusinessContextInfo object with the location icon, the heading as the distance to 266 private BusinessContextInfo constructLocationInfo(Address address, float distance) { argument 267 return constructLocationInfo(Locale.getDefault(), address, distance); 272 float distance) { 279 if (distance ! 271 constructLocationInfo(Locale locale, Address address, float distance) argument [all...] |
/packages/apps/PhoneCommon/src/com/android/phone/common/compat/ |
H A D | PathInterpolatorCompat.java | 54 final float distance = (i * pathLength) / (numPoints - 1); 55 pathMeasure.getPosTan(distance, position, null /* tangent */);
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/result/ |
H A D | suggestions_output_utils.cpp | 204 // Get the distance for the first word of the suggestion 205 const float distance = terminalDicNode->getNormalizedCompoundDistanceAfterFirstWord(); local 217 // Expected distance is about 0.2 ~ 2.0, but consider 0.0 ~ 2.0 227 // The smaller the edit distance, the higher the contribution. MIN_EXPECTED_DISTANCE means 0 229 // weight of the distance. Clamp to avoid overflows. 230 const float clampedDistance = distance < MIN_EXPECTED_DISTANCE ? MIN_EXPECTED_DISTANCE 231 : distance > MAX_EXPECTED_DISTANCE ? MAX_EXPECTED_DISTANCE : distance;
|
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
H A D | LocationClustering.java | 38 // If the total distance change is less than this ratio, stop iterating. 222 // (sum of distance from each point to its group center) * sqrt(k). 255 float distance = (float) GalleryUtils.fastDistanceMeters( 257 // We may have small non-zero distance introduced by 260 if (distance < 1) { 261 distance = 0; 263 if (distance < bestDistance) { 264 bestDistance = distance;
|
/packages/apps/ExactCalculator/src/com/android/calculator2/ |
H A D | CalculatorResult.java | 139 int distance = (int)distanceX; 147 if (mCurrentPos + distance < mMinPos) { 148 distance = mMinPos - mCurrentPos; 149 } else if (mCurrentPos + distance > mMaxPos) { 150 distance = mMaxPos - mCurrentPos; 154 mScroller.startScroll(mCurrentPos, 0, distance, 0, (int)duration);
|
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ |
H A D | MessageScrollView.java | 221 int distance = (deltaX * deltaX) + (deltaY * deltaY); 222 if (distance > mTouchSlopSquared) {
|
/packages/apps/Gallery2/src/com/android/gallery3d/app/ |
H A D | EyePosition.java | 146 float distance = (gx > 0 ? gx : -gx) + (gy > 0 ? gy : - gy); 147 if (distance < GYROSCOPE_THRESHOLD 148 || distance > GYROSCOPE_LIMIT || mGyroscopeCountdown > 0) {
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/aggregation/util/ |
H A D | ContactMatcher.java | 63 // Minimum edit distance between two names to be considered an approximate match 66 // Minimum edit distance between two email ids to be considered an approximate match 81 * match producing the score of 70. The score may also be 0 if the similarity (distance) 190 * of name we found and, if the match is approximate, the distance between the candidate and 229 float distance = nameDistance.getDistance(decodedCandidateName, decodedName); 235 if (distance > threshold) { 236 score = (int)(minScore + (maxScore - minScore) * (1.0f - distance));
|
H A D | RawContactMatcher.java | 67 // Minimum edit distance between two names to be considered an approximate match 70 // Minimum edit distance between two email ids to be considered an approximate match 85 * match producing the score of 70. The score may also be 0 if the similarity (distance) 188 * of name we found and, if the match is approximate, the distance between the candidate and 227 float distance = nameDistance.getDistance(decodedCandidateName, decodedName); 233 if (distance > threshold) { 234 score = (int)(minScore + (maxScore - minScore) * (1.0f - distance));
|
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/ |
H A D | PhotoTouchListener.java | 111 // distance travelled before stopping 208 double distance = Math.hypot(x0 - mInitialTouchX, 211 if (distance < mTouchSlop) { 221 distance < mTouchSlop) {
|
/packages/services/Car/car-cluster-demo-renderer/src/android/car/cluster/demorenderer/ |
H A D | DemoInstrumentClusterView.java | 80 public void setNextTurnDistance(String distance) { argument 81 Log.d(TAG, "setNextTurnDistance, distance: " + distance); 82 mDistanceView.setText(distance);
|
/packages/apps/Calendar/src/com/android/calendar/agenda/ |
H A D | AgendaByDayAdapter.java | 545 long distance = Math.abs(millis - row.mEventStartTimeMilli); 546 if (distance < idFoundMinDistance) { 547 idFoundMinDistance = distance; 565 long distance = Math.abs(millis - row.mEventStartTimeMilli); 566 if (distance < minDistance) { 567 minDistance = distance;
|
/packages/apps/PackageInstaller/src/android/support/wearable/view/ |
H A D | WearableListView.java | 321 float distance = (deltaX * deltaX) + (deltaY * deltaY); 322 // Verify that the distance moved in the combined x/y direction is at 324 if (distance > (mTouchSlop * mTouchSlop)) { 623 // distance starts growing again, instead of finding the closest. It would safe half of 632 final int distance = Math.abs(centerY - childCenterY); 633 if (distance < closest) { 634 closest = distance; 843 // distance starts growing again, instead of finding the closest. It would safe half of 852 final int distance = Math.abs(centerY - childCenterY); 853 if (distance < closes [all...] |