-
-
Notifications
You must be signed in to change notification settings - Fork 553
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #29198: Set up hypercube with both Vrep and Hrep (if backend sup…
…ports it) Currently, the hypercube is set up with the vertices. This is slow, as the vertices grow exponentially with dimension: {{{ sage: %time _ = polytopes.hypercube(8) CPU times: user 58.6 ms, sys: 0 ns, total: 58.6 ms Wall time: 58.2 ms sage: %time _ = polytopes.hypercube(14) CPU times: user 2.74 s, sys: 19.1 ms, total: 2.76 s Wall time: 2.76 s }}} With #28880 at hand, we can set up the hypercube with both Vrep and Hrep. If the backend supports it (as in `backend='field'`), then the double description does not need to be computed. If the backend does not support it (as in `backend='ppl'`), then the hypercube is set up from the inequalities, which is much faster: {{{ sage: %time _ = polytopes.hypercube(8) # uses ppl CPU times: user 47.8 ms, sys: 3.19 ms, total: 51 ms Wall time: 50 ms sage: %time _ = polytopes.hypercube(14) # uses ppl CPU times: user 421 ms, sys: 4.7 ms, total: 426 ms Wall time: 425 ms sage: %time _ = polytopes.hypercube(14, backend='field') # uses both descriptions CPU times: user 168 ms, sys: 124 µs, total: 169 ms Wall time: 168 ms }}} URL: https://trac.sagemath.org/29198 Reported by: gh-kliem Ticket author(s): Jonathan Kliem Reviewer(s): Jean-Philippe Labbé, Sébastien Labbé
- Loading branch information
Showing
10 changed files
with
238 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.