Changes between Initial Version and Version 2 of Ticket #24451


Ignore:
Timestamp:
12/30/17 21:51:24 (4 years ago)
Author:
mcbell
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24451

    • Property Status changed from new to needs_review
    • Property Authors changed from to Mark Bell
    • Property Cc vdelecroix tmonteil mkoeppe added
    • Property Component changed from PLEASE CHANGE to geometry
    • Property Branch changed from to u/mcbell/polyhedron_get_integral_point
    • Property Keywords Polyhedron integral_points added
    • Property Commit changed from to d3b9b396c1dc9d6ca8c9478b01035454ebbe1f74
    • Property Type changed from PLEASE CHANGE to enhancement
  • Ticket #24451 – Description

    initial v2  
     1This patch adds a method Polyhedron.get_integral_point(index) which returns the nth integral point in the polyhedron. It is equivalent to Polyhedron.integral_points()[index]. However when Polyhedron.integral_points_count() does not need to enumerate all of the integral points, for example in rational Polyhedra, neither does this method. Hence it can be significantly faster.
     2
     3This method is useful for performing random sampling of integral points since it allows points to be chosen uniformly at random via:
     4
     5{{{
     6    index = randint(0, P.integral_points_count())
     7    point = P.get_integral_point(index)
     8}}}