Skip to content

Commit e6f9513

Browse files
committed
Trac #22067 comment:117: document split better
1 parent b086f94 commit e6f9513

File tree

2 files changed

+44
-17
lines changed

2 files changed

+44
-17
lines changed

src/sage/geometry/polyhedron/base.py

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8719,37 +8719,53 @@ def generating_function_of_integral_points(self, **kwds):
87198719
The following keyword arguments are passed to
87208720
:func:`~sage.geometry.polyhedron.generating_function.generating_function_of_integral_points`:
87218721
8722-
- ``split`` -- (default: ``False``) ``False`` computes the generating
8723-
function directly, whereas ``True`` splits the ``polyhedron``
8724-
into several small disjoint polyhedra and adds the results.
8725-
``split`` may also be a list of disjoint polyhedra.
8722+
- ``split`` -- (default: ``False``) a boolean or list
8723+
8724+
- ``split=False`` computes the generating function directly,
8725+
without any splitting.
8726+
8727+
- When ``split`` is a list of disjoint polyhedra, then
8728+
for each of these polyhedra, this polyhedron is intersected with it,
8729+
its generating function computed and all these generating functions
8730+
are summed up.
8731+
8732+
- ``split=True`` splits into `d!` disjoint polyhedra.
87268733
87278734
- ``result_as_tuple`` -- (default: ``None``) a boolean or ``None``
8728-
specifying whether the output is a (partial) factorization
8735+
8736+
This specifies whether the output is a (partial) factorization
87298737
(``result_as_tuple=False``) or a sum of such (partial)
87308738
factorizations (``result_as_tuple=True``). By default
87318739
(``result_as_tuple=None``), this is automatically determined.
87328740
If the output is a sum, it is represented as a tuple whose
87338741
entries are the summands.
87348742
8735-
- ``indices`` -- (default: ``None``) a list or tuple. If this
8743+
- ``indices`` -- (default: ``None``) a list or tuple
8744+
8745+
If this
87368746
is ``None``, this is automatically determined.
87378747
8738-
- ``name`` -- (default: ``'y'``) a string.
8748+
- ``name`` -- (default: ``'y'``) a string
8749+
87398750
The variable names of the Laurent polynomial ring of the output
87408751
are this string followed by an integer.
87418752
8742-
- ``names`` -- a list or tuple of names (strings), or a comma separated string.
8753+
- ``names`` -- a list or tuple of names (strings), or a comma separated string
8754+
87438755
``name`` is extracted from ``names``, therefore ``names`` has to contain
87448756
exactly one variable name, and ``name`` and``names`` cannot be specified
87458757
both at the same time.
87468758
87478759
- ``Factorization_sort`` (default: ``False``) and
8748-
``Factorization_simplify`` (default: ``True``) -- are passed on to
8760+
``Factorization_simplify`` (default: ``True``) -- booleans
8761+
8762+
These are passed on to
87498763
:class:`sage.structure.factorization.Factorization` when creating
87508764
the result.
87518765
8752-
- ``sort_factors`` -- (default: ``False``) a boolean. If set, then
8766+
- ``sort_factors`` -- (default: ``False``) a boolean
8767+
8768+
If set, then
87538769
the factors of the output are sorted such that the numerator is
87548770
first and only then all factors of the denominator. It is ensured
87558771
that the sorting is always the same; use this for doctesting.
@@ -8758,10 +8774,16 @@ def generating_function_of_integral_points(self, **kwds):
87588774
87598775
The generating function as a (partial)
87608776
:class:`~sage.structure.factorization.Factorization`
8761-
of the result whose factors are laurent polynomials.
8777+
of the result whose factors are Laurent polynomials
8778+
87628779
The result might be a tuple of such factorizations
87638780
(depending on the parameter ``result_as_tuple``) as well.
87648781
8782+
.. NOTE::
8783+
8784+
At the moment, only polyhedra with nonnegative coordinates
8785+
(i.e. a polyhedron in the nonnegative orthant) are handled.
8786+
87658787
EXAMPLES::
87668788
87678789
sage: P2 = (

src/sage/geometry/polyhedron/generating_function.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def generating_function_of_integral_points(polyhedron, split=False,
4343
**kwds):
4444
r"""
4545
Return the multivariate generating function of the
46-
integral points of the polyhedron.
46+
integral points of the ``polyhedron``.
4747
4848
To be precise, this returns
4949
@@ -58,12 +58,17 @@ def generating_function_of_integral_points(polyhedron, split=False,
5858
:class:`~sage.geometry.polyhedron.base.Polyhedron_base`
5959
(see also :mod:`sage.geometry.polyhedron.constructor`)
6060
61-
- ``split`` -- (default: ``False``) a boolean
61+
- ``split`` -- (default: ``False``) a boolean or list
6262
63-
``False`` computes the generating
64-
function directly, whereas ``True`` splits the ``polyhedron``
65-
into several small disjoint polyhedra and adds the results.
66-
``split`` may also be a list of disjoint polyhedra.
63+
- ``split=False`` computes the generating function directly,
64+
without any splitting.
65+
66+
- When ``split`` is a list of disjoint polyhedra, then
67+
for each of these polyhedra, ``polyhedron`` is intersected with it,
68+
its generating function computed and all these generating functions
69+
are summed up.
70+
71+
- ``split=True`` splits into `d!` disjoint polyhedra.
6772
6873
- ``result_as_tuple`` -- (default: ``None``) a boolean or ``None``
6974

0 commit comments

Comments
 (0)