mirror of https://github.com/CGAL/cgal
interval->range, and minor typos fixing
This commit is contained in:
parent
580a2d5759
commit
3c79d41be4
|
|
@ -92,7 +92,7 @@ access iterator range which is useful to produce degenerate input data
|
|||
sets with multiple entries of identical items.
|
||||
|
||||
The class \ccc{Combination_enumerator<CombinationElement>} is used to enumerate
|
||||
all fixed-size combinations (subsets) of an interval of elements. It is useful
|
||||
all fixed-size combinations (subsets) of a range of elements. It is useful
|
||||
in the context of high-dimensional triangulations, e.g., for enumerating the
|
||||
faces of a simplex.
|
||||
|
||||
|
|
@ -320,10 +320,11 @@ Generating 20 grid points in 4D
|
|||
|
||||
\section{Example Generating Combinations}
|
||||
|
||||
\paragraph{From an Integer Interval}
|
||||
\paragraph{From a Range of Integers}
|
||||
|
||||
The following example enumerates and outputs all subsets of 3 elements from the
|
||||
rage $[10, 15]$. Accordingly, it outputs $\displaystyle\frac{6!}{3! 3!}=20$ triples.
|
||||
range $[10, 15]$. Accordingly, it outputs $\displaystyle\frac{6!}{3! 3!}=20$
|
||||
triples.
|
||||
|
||||
\smallskip
|
||||
\ccIncludeExampleCode{Generator/combination_enumerator.cpp}
|
||||
|
|
|
|||
|
|
@ -2,12 +2,11 @@
|
|||
\begin{ccRefClass}{Combination_enumerator<CombinationElement>}
|
||||
|
||||
\ccDefinition
|
||||
% FIXME TODO: range -> interval
|
||||
The class \ccRefName's purpose is to enumerate all fixed-size combinations
|
||||
(subsets) of a \emph{source interval} of elements. For example, it can
|
||||
enumerate all the combinations of 2 elements from the source interval $[3,7)$
|
||||
The class \ccRefName\ is used to enumerate all fixed-size combinations
|
||||
(subsets) of a \emph{source range} of elements. For example, it can
|
||||
enumerate all the combinations of 2 elements from the source range $[3,7)$
|
||||
($7$ excluded) which gives the enumeration \{3,4\}, \{3,5\}, \{3,6\}, \{4,5\},
|
||||
\{4,6\}, \{5,6\}. The source interval consists of elements of type
|
||||
\{4,6\}, \{5,6\}. The source range consists of elements of type
|
||||
\ccc{CombinationElement} and is specified by its first element and the element
|
||||
just beyond its last one.
|
||||
|
||||
|
|
@ -27,7 +26,7 @@ that order, so that we can talk about the first or last combination.
|
|||
\ccCreationVariable{c}
|
||||
\ccConstructor{Combination_enumerator(int k, const CombinationElement & first,
|
||||
const CombinationElement & beyond);}{This constructor initializes \ccVar\ to
|
||||
enumerate the combinations of \ccc{k} elements from the source interval
|
||||
enumerate the combinations of \ccc{k} elements from the source range
|
||||
\ccc{[first, beyond)}. The current combination is set to the first combination
|
||||
of the enumeration. \ccPrecond{\ccc{1 <= k <= beyond - first}}}
|
||||
|
||||
|
|
@ -46,11 +45,11 @@ element of the current combination. \ccPrecond{\ccc{0 <= i < }
|
|||
combinations (the parameter \ccc{k} from the class' constructor).}
|
||||
|
||||
\ccMethod{const CombinationElement & min_element();}{Returns the smallest
|
||||
element of the source interval. (the parameter \ccc{first} of the class'
|
||||
element of the source range. (the parameter \ccc{first} of the class'
|
||||
constructor).}
|
||||
|
||||
\ccMethod{const CombinationElement & beyond_element();}{Returns the successor
|
||||
to the largest element of the source interval (the parameter \ccc{beyond} of
|
||||
to the largest element of the source range (the parameter \ccc{beyond} of
|
||||
the class' constructor).}
|
||||
|
||||
\ccMethod{bool finished();}{Returns \ccc{true} if and only if all combinations
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
\input{Generator_ref/intro.tex}
|
||||
|
||||
%\input{Generator_ref/default_random.tex}
|
||||
\input{Generator_ref/default_random.tex}
|
||||
\input{Generator_ref/perturb_points_2.tex}
|
||||
\input{Generator_ref/points_on_segment_2.tex}
|
||||
\input{Generator_ref/Points_on_segment_2_functor.tex}
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
\input{Generator_ref/random_selection.tex}
|
||||
\input{Generator_ref/Combination_enumerator.tex}
|
||||
\input{Generator_ref/CombinationElement.tex}
|
||||
%\input{Generator_ref/Random.tex}
|
||||
\input{Generator_ref/Random.tex}
|
||||
\input{Generator_ref/RandomConvexSetTraits_2.tex}
|
||||
\input{Generator_ref/RandomPolygonTraits_2.tex}
|
||||
\input{Generator_ref/Random_convex_set_traits_2.tex}
|
||||
|
|
|
|||
Loading…
Reference in New Issue