You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/02/12 08:33:11 UTC

[GitHub] [lucene-solr] iverase opened a new pull request #1252: LUCENE-9218: XYGeoemtries should expose values as floats

iverase opened a new pull request #1252: LUCENE-9218: XYGeoemtries should expose values as floats
URL: https://github.com/apache/lucene-solr/pull/1252
 
 
   Boxing the values to doubles happen when creating component2D objects.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] iverase merged pull request #1252: LUCENE-9218: XYGeometries should expose values as floats

Posted by GitBox <gi...@apache.org>.
iverase merged pull request #1252: LUCENE-9218: XYGeometries should expose values as floats
URL: https://github.com/apache/lucene-solr/pull/1252
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] jpountz commented on a change in pull request #1252: LUCENE-9218: XYGeometries should expose values as floats

Posted by GitBox <gi...@apache.org>.
jpountz commented on a change in pull request #1252: LUCENE-9218: XYGeometries should expose values as floats
URL: https://github.com/apache/lucene-solr/pull/1252#discussion_r379314539
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/geo/XYEncodingUtils.java
 ##########
 @@ -68,7 +68,15 @@ public static double decode(int encoded) {
    * @param offset offset into {@code src} to decode from.
    * @return decoded value.
    */
-  public static double decode(byte[] src, int offset) {
+  public static float decode(byte[] src, int offset) {
     return decode(NumericUtils.sortableBytesToInt(src, offset));
   }
+
+  static double[] floatToDouble(float[] f) {
 
 Review comment:
   nit: maybe add `Array` to the method name

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] jpountz commented on a change in pull request #1252: LUCENE-9218: XYGeometries should expose values as floats

Posted by GitBox <gi...@apache.org>.
jpountz commented on a change in pull request #1252: LUCENE-9218: XYGeometries should expose values as floats
URL: https://github.com/apache/lucene-solr/pull/1252#discussion_r379314365
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/geo/XYEncodingUtils.java
 ##########
 @@ -33,11 +33,12 @@
   private XYEncodingUtils() {
   }
 
-  /** validates value is within +/-{@link Float#MAX_VALUE} coordinate bounds */
-  public static void checkVal(double x) {
-    if (Double.isNaN(x) || x < MIN_VAL_INCL || x > MAX_VAL_INCL) {
+  /** validates value is a number and finite */
+  static float checkVal(float x) {
+    if (Float.isNaN(x) || Float.isInfinite(x)) {
 
 Review comment:
   This could be a single test.
   ```suggestion
       if (Float.isFinite(x) == false) {
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org