Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Add documentation and example for preprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Mar 30, 2017
1 parent 37e9c66 commit 540a097
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sage/geometry/polyhedron/base_QQ.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ def integral_points_count(self, verbose=False, use_Hrepresentation=False,
- ``use_Hrepresentation`` - (boolean; ``False`` by default) -- whether
to send the H or V representation to LattE
- ``preprocess`` - (boolean; ``True`` by default) -- whether, if the integral hull
is known to lie in a coordinate hyperplane, to tighten bounds to reduce dimension
.. SEEALSO::
:mod:`~sage.interfaces.latte` the interface to LattE interfaces
Expand Down Expand Up @@ -145,13 +148,15 @@ def integral_points_count(self, verbose=False, use_Hrepresentation=False,
...
NotImplementedError: ...
"Fibonacci" knapsacks::
"Fibonacci" knapsacks (preprocessing helps a lot)::
sage: def fibonacci_knapsack(d, b, backend=None):
....: lp = MixedIntegerLinearProgram(base_ring=QQ)
....: x = lp.new_variable(nonnegative=True)
....: lp.add_constraint(lp.sum(fibonacci(i+3)*x[i] for i in range(d)) <= b)
....: return lp.polyhedron(backend=backend)
sage: fibonacci_knapsack(20, 12).integral_points_count() # does not finish with preprocess=False
33
TESTS:
Expand Down

0 comments on commit 540a097

Please sign in to comment.