mirror of https://github.com/CGAL/cgal
petits ajustements anglais doc
This commit is contained in:
parent
1a75179c94
commit
a0fdbe9ab0
|
|
@ -4,8 +4,8 @@ namespace CGAL {
|
|||
\ingroup PkgGenerators
|
||||
|
||||
|
||||
\brief Computes a random convex polygon by writing its vertices (oriented
|
||||
counterclockwise) in an `OutputIterator`, as the convex hull of \f$ n \f$ random points in a disc centered in \f$0\f$ with radius `radius`.
|
||||
\brief Computes a random convex polygon as the convex hull of \f$ n \f$ random points in a disc centered in \f$0\f$ with radius `radius`.
|
||||
The vertices are stored counterclockwise in `it`.
|
||||
The generated polygon will have an average number of vertices \f$ n^\frac{1}{3}(1+o(1))\f$.
|
||||
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ The generated polygon will have an average number of vertices \f$ n^\frac{1}{3}(
|
|||
|
||||
- `Generator` has to be a Boost random generator, such as `boost::random::mt19937`.
|
||||
|
||||
- `fast` is a Boolean value, `true` for a time-efficient behavior and `false` for a memory-efficient behavior.
|
||||
- `fast` is a Boolean , set to `true` for time efficiency and to `false` for memory efficiency.
|
||||
|
||||
- `Traits` is a model of the concept `RandomConvexHullTraits_2`.
|
||||
|
||||
|
|
@ -26,14 +26,14 @@ The generated polygon will have an average number of vertices \f$ n^\frac{1}{3}(
|
|||
|
||||
\cgalHeading{Implementation}
|
||||
|
||||
The implementation is based on an incremental construction of a convex hull. At each step a quantity of points that won't be change the convex hull is evaluted using a binomial law.
|
||||
Thus, all the points doesn't have to be generated, reducing the time and size complexities.
|
||||
The implementation is based on an incremental construction of a convex hull. At each step, we choose a number of points to pick uniformly at random in the disc. Then, a subset of these points, that won't change the convex hull, is evaluated using a Binomial law.
|
||||
As these points won't be generated, the time and size complexities are reduced.
|
||||
A tradeoff between time and memory is provided with the option `fast`, true by default. Using the `fast` option, both time and size expected complexities are \f$O\left(n^\frac{1}{3}\log^\frac{2}{3}n \right)\f$.
|
||||
If this option is disabled, the expected size complexity becomes \f$O\left(n^\frac{1}{3}\right)\f$ but the expected time complexity becomes \f$O\left(n^\frac{1}{3}\log^2 n \right)\f$.
|
||||
|
||||
\cgalHeading{Example}
|
||||
|
||||
The following program computes a random polygon defined as the convex hull of \f$10000\f$ points uniformly generated in a disc.
|
||||
The following program computes a random polygon defined as the convex hull of \f$10000\f$ points uniformly generated in the disc of radius \f$1\f$ centered in \f$0\f$.
|
||||
|
||||
\cgalExample{Generator/random_convex_hull_2.cpp}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue