Searched refs:distance (Results 1 - 25 of 46) sorted by relevance

12

/lucene-3.6.0/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/geometry/
H A DDistanceUnits.java21 * Enum representing difference distance units, currently only kilometers and
42 * @param earthRadius Radius of the Earth in the specific distance unit
43 * @param earthCircumfence Circumference of the Earth in the specific distance unit
67 throw new IllegalArgumentException("Unknown distance unit " + unit);
71 * Converts the given distance in given DistanceUnit, to a distance in the unit represented by {@code this}
73 * @param distance Distance to convert
74 * @param from Unit to convert the distance from
75 * @return Given distance converted to the distance i
77 convert(double distance, DistanceUnits from) argument
[all...]
/lucene-3.6.0/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/
H A DProximityQueryNode.java29 * specific distance conditions. (a b c) WITHIN [SENTENCE|PARAGRAPH|NUMBER]
65 public ProximityType(Type type, int distance) { argument
67 this.pDistance = distance;
72 private int distance = -1; field in class:ProximityQueryNode
83 * @param distance
84 * - positive integer that specifies the distance
90 Type type, int distance, boolean inorder) {
97 if (distance <= 0) {
99 QueryParserMessages.PARAMETER_VALUE_NOT_SUPPORTED, "distance",
100 distance));
89 ProximityQueryNode(List<QueryNode> clauses, CharSequence field, Type type, int distance, boolean inorder) argument
[all...]
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/util/
H A DVirtualMethod.java52 * <p>{@link #getImplementationDistance} returns the distance of the subclass that overrides this method.
53 * The one with the larger distance should be used preferable.
90 * Returns the distance from the {@code baseClass} in which this method is overridden/implemented
92 * @return 0 iff not overridden, else the distance to the base class
95 Integer distance = cache.get(subclazz);
96 if (distance == null) {
98 cache.put(subclazz, distance = Integer.valueOf(reflectImplementationDistance(subclazz)));
100 return distance.intValue();
118 int distance = 0;
129 // increment distance i
[all...]
/lucene-3.6.0/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/
H A DDistanceUtilsTest.java154 double distance;
155 distance = DistanceUtils.vectorDistance(zero, zeroOne, 2);
156 assertEquals(1.0, distance, 0);
157 distance = DistanceUtils.vectorDistance(zero, oneZero, 2);
158 assertEquals(1.0, distance, 0);
159 distance = DistanceUtils.vectorDistance(zero, oneOne, 2);
160 assertEquals(Math.sqrt(2), distance, 0.001);
162 distance = DistanceUtils.squaredEuclideanDistance(zero, oneOne);
163 assertEquals(2, distance, 0.001);
167 double distance;
[all...]
/lucene-3.6.0/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/
H A DDistanceFilter.java39 protected double distance; field in class:DistanceFilter
44 /** Filters the startingFilter by precise distance
46 public DistanceFilter(Filter startingFilter, double distance) { argument
51 this.distance = distance;
53 // NOTE: neither of the distance filters use precision
103 if (maxDocs > 1000 && distance > 10) {
107 if (maxDocs > 10000 && distance > 10){
H A DLatLongDistanceFilter.java50 * Provide a distance filter based from a center point with a radius
97 if (d < distance) {
117 this.distance != other.distance ||
130 int h = Double.valueOf(distance).hashCode();
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/search/
H A DDefaultSimilarity.java55 /** Implemented as <code>1 / (distance + 1)</code>. */
57 public float sloppyFreq(int distance) { argument
58 return 1.0f / (distance + 1);
H A DSimilarityDelegator.java56 public float sloppyFreq(int distance) { argument
57 return delegee.sloppyFreq(distance);
/lucene-3.6.0/solr/core/src/java/org/apache/solr/search/
H A DSpatialOptions.java29 public double distance; field in class:SpatialOptions
53 this.distance = dist;
/lucene-3.6.0/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/
H A DDistanceUtils.java89 * distance/radius.
90 * @param distance The distance travelled
92 * @return The angular distance, in radians
94 public static double angularDistance(double distance, double radius){ argument
95 return distance/radius;
103 * @param power The power (2 for Euclidean distance, 1 for manhattan, etc.)
118 * @param power The power (2 for Euclidean distance, 1 for manhattan, etc.)
155 * @param distance The d from the center to the corner
159 public static double[] vectorBoxCorner(double[] center, double[] result, double distance, boolea argument
187 latLonCornerDegs(double latCenter, double lonCenter, double distance, double [] result, boolean upperRight, double sphereRadius) argument
211 latLonCorner(double latCenter, double lonCenter, double distance, double [] result, boolean upperRight, double sphereRadius) argument
230 pointOnBearing(double startLat, double startLon, double distance, double bearing, double[] result, double sphereRadius) argument
[all...]
/lucene-3.6.0/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/geohash/
H A DGeoHashDistanceFilter.java48 * Provide a distance filter based from a center point with a radius
92 if (d < distance){
110 this.distance != other.distance ||
122 int h = Double.valueOf(distance).hashCode();
/lucene-3.6.0/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/
H A DTestCartesian.java215 // create a distance query
236 double distance = dq.distanceFilter.getDistance(doc);
238 if (distance < 1.0d)
239 distance = 1.0d;
240 //boost by distance is invertly proportional to
241 // to distance from center point to location
242 float score = (float) ((miles - distance) / miles );
249 // Create a distance sort
250 // As the radius filter has performed the distance calculations
257 // distance sor
[all...]
/lucene-3.6.0/solr/contrib/langid/src/java/org/apache/solr/update/processor/
H A DTikaLanguageIdentifierUpdateProcessor.java47 // FIXME: Hack - we get the distance from toString and calculate our own certainty score
48 Double distance = Double.parseDouble(tikaSimilarityPattern.matcher(identifier.toString()).replaceFirst("$1"));
50 Double certainty = 1 - (5 * distance);
54 log.debug("Language detected as "+language+" with a certainty of "+language.getCertainty()+" (Tika distance="+identifier.toString()+")");
/lucene-3.6.0/solr/core/src/java/org/apache/solr/search/function/distance/
H A DSquaredEuclideanFunction.java1 package org.apache.solr.search.function.distance;
25 * While not strictly a distance, the Sq. Euclidean Distance is often all that is needed in many applications
26 * that require a distance, thus saving a sq. rt. calculation
32 super(-1, source1, source2);//overriding distance, so power doesn't matter here
46 protected double distance(int doc, DocValues dv1, DocValues dv2) { method in class:SquaredEuclideanFunction
H A DGeohashHaversineFunction.java1 package org.apache.solr.search.function.distance;
32 * Calculate the Haversine distance between two geo hash codes.
38 * @see org.apache.solr.search.function.distance.HaversineFunction for more details on the implementation
79 return distance(doc, gh1DV, gh2DV);
98 protected double distance(int doc, DocValues gh1DV, DocValues gh2DV) { method in class:GeohashHaversineFunction
H A DHaversineFunction.java1 package org.apache.solr.search.function.distance;
32 * Calculate the Haversine formula (distance) between any two points on a sphere
70 * @return The haversine distance formula
72 protected double distance(int doc, DocValues p1DV, DocValues p2DV) { method in class:HaversineFunction
120 return distance(doc, vals1, vals2);
H A DVectorDistanceFunction.java1 package org.apache.solr.search.function.distance;
37 * <li>1 = Manhattan distance</li>
38 * <li>2 = Euclidean distance</li>
64 * Calculate the distance
69 * @return The distance
71 protected double distance(int doc, DocValues dv1, DocValues dv2) { method in class:VectorDistanceFunction
116 return distance(doc, vals1, vals2);
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/search/
H A DTestNumericRangeQuery32.java39 // distance of entries
40 private static int distance; field in class:TestNumericRangeQuery32
53 distance = (1 << 30) / noDocs;
70 // add fields, that have a distance to test general functionality
72 // add ascending fields with a distance of 1, beginning at -noDocs/2 to test the correct splitting of range and inclusive/exclusive
77 int val=distance*l+startOffset;
117 int lower=(distance*3/2)+startOffset, upper=lower + count*distance + (distance/3);
145 assertEquals("First doc"+type, 2*distance
[all...]
H A DTestNumericRangeQuery64.java39 // distance of entries
40 private static long distance; field in class:TestNumericRangeQuery64
53 distance = (1L << 60) / noDocs;
72 // add fields, that have a distance to test general functionality
74 // add ascending fields with a distance of 1, beginning at -noDocs/2 to test the correct splitting of range and inclusive/exclusive
79 long val=distance*l+startOffset;
121 long lower=(distance*3/2)+startOffset, upper=lower + count*distance + (distance/3);
149 assertEquals("First doc"+type, 2*distance
[all...]
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/search/
H A DTestNumericRangeQuery32.java39 // distance of entries
40 private static int distance; field in class:TestNumericRangeQuery32
53 distance = (1 << 30) / noDocs;
70 // add fields, that have a distance to test general functionality
72 // add ascending fields with a distance of 1, beginning at -noDocs/2 to test the correct splitting of range and inclusive/exclusive
77 int val=distance*l+startOffset;
117 int lower=(distance*3/2)+startOffset, upper=lower + count*distance + (distance/3);
145 assertEquals("First doc"+type, 2*distance
[all...]
H A DTestNumericRangeQuery64.java39 // distance of entries
40 private static long distance; field in class:TestNumericRangeQuery64
53 distance = (1L << 60) / noDocs;
72 // add fields, that have a distance to test general functionality
74 // add ascending fields with a distance of 1, beginning at -noDocs/2 to test the correct splitting of range and inclusive/exclusive
79 long val=distance*l+startOffset;
121 long lower=(distance*3/2)+startOffset, upper=lower + count*distance + (distance/3);
149 assertEquals("First doc"+type, 2*distance
[all...]
/lucene-3.6.0/solr/core/src/test/org/apache/solr/search/
H A DSpatialFilterTest.java64 //large distance
74 //large distance
94 //large distance
115 //really fine grained distance and reflects some of the vagaries of how we are calculating the box
118 // falls outside of the real distance, but inside the bounding box
138 private void checkHits(String fieldName, String pt, double distance, int count, int ... docIds) { argument
139 checkHits(fieldName, true, pt, distance, count, docIds);
142 private void checkHits(String fieldName, boolean exact, String pt, double distance, int count, int ... docIds) { argument
155 "pt", pt, "d", String.valueOf(distance)),
/lucene-3.6.0/solr/core/src/java/org/apache/solr/schema/
H A DGeoHashField.java35 import org.apache.solr.search.function.distance.GeohashHaversineFunction;
68 new LiteralValueSource(geohash), options.radius), "0", String.valueOf(options.distance), true, true));
H A DPointType.java193 //TODO: Handle distance measures
194 String lower = String.valueOf(point[0] - options.distance);
195 String upper = String.valueOf(point[0] + options.distance);
201 //TODO: Handle distance measures, as this assumes Euclidean
202 double [] ur = DistanceUtils.vectorBoxCorner(point, null, options.distance, true);
203 double [] ll = DistanceUtils.vectorBoxCorner(point, null, options.distance, false);
/lucene-3.6.0/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/geometry/shape/
H A DLineSegment.java44 * Finds the distance of a specified point from the line segment and the
52 * @return Returns the distance from P to the closest point on the segment.
54 public double distance(Point2D P, Point2D /* out */closestPt) { method in class:LineSegment

Completed in 5008 milliseconds

12