[ 
https://issues.apache.org/jira/browse/LUCENE-7185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15245089#comment-15245089
 ] 

Robert Muir commented on LUCENE-7185:
-------------------------------------

Attached is some improvements to the polygon/box testing, really its just about 
the points we pick to test. I haven't yet improved the actual polygons being 
generated.

Here is a visual of what random points and boxes look like with the old 
generator. You can see it essentially only targets vertices for points and 
boxes and so these are usually not very interesting.
!oldRandom.png!

Here is the new one: it tries better to find edge cases. Specifically we attack 
edges themselves, the bounding box, diagonals between vertices, and so on. I 
improved boxes as well, they definitely still could use work but should be more 
effective.
!newRandom.png!

I will beast the tests to try to reduce any noise. I think its ok given what 
our tests are doing (and the very simple stuff we are doing today with polys).

> fix random number generation used for spatial tests
> ---------------------------------------------------
>
>                 Key: LUCENE-7185
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7185
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>         Attachments: LUCENE-7185.patch, LUCENE-7185_polygon.patch, 
> LUCENE-7185_sorting.patch, newRandom.png, oldRandom.png
>
>
> The current method is not very good for testing. 
> * It will only rarely or never return edge cases like -180/180/-90/90
> * It will only rarely return 0
> * There are many possible doubles within the ranges (-180..180/-90..90) it 
> will never return



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to