/usr/include/openturns/swig/Combinations_doc.i is in libopenturns-dev 1.9-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | %feature("docstring") OT::Combinations
"Combinations generator.
Available constructors:
Combinations()
Combinations(*k, n*)
Parameters
----------
k : integer
The cardinal of the subsets
n : integer
The cardinal of the base set
See also
--------
CombinatorialGenerator, KPermutations, Tuples
Notes
-----
In the first usage, the generator is built using the default values :math:`k = 1`,
:math:`n = 1`.
In the second usage, the generator produces all the subsets with *k* elements of
a base set with *n* elements. The subsets are produced as a collection of
:class:`~openturns.Indices` in lexical order, the elements of each subset being
sorted in increasing order.
The number of indices generated is:
.. math::
\\\\frac{n!}{k! (n - k)!}
The combinations generator generates a collection of :class:`~openturns.Indices`
where:
- the :class:`~openturns.Indices` are sorted in lexical order,
- the components are sorted within a given :class:`~openturns.Indices`.
Examples
--------
>>> import openturns as ot
>>> tuples = ot.Combinations(2, 5)
>>> print(tuples.generate())
[[0,1],[0,2],[0,3],[0,4],[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]#10
"
// ---------------------------------------------------------------------
%feature("docstring") OT::Combinations::getK
"Accessor to the cardinal of the subsets.
Returns
-------
k : integer
The cardinal of the subsets."
// ---------------------------------------------------------------------
%feature("docstring") OT::Combinations::getN
"Accessor to the cardinal of the base set.
Returns
-------
n : integer
The cardinal of the base set."
// ---------------------------------------------------------------------
%feature("docstring") OT::Combinations::setK
"Accessor to the cardinal of the subsets.
Parameters
----------
k : integer
The cardinal of the subsets."
// ---------------------------------------------------------------------
%feature("docstring") OT::Combinations::setN
"Accessor to the cardinal of the base set.
Parameters
----------
n : integer
The cardinal of the base set."
|