-
-
Notifications
You must be signed in to change notification settings - Fork 517
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #29843: Set up linear transformation with precomputed data if in…
…jective We set up linear transformation with double description, if it preserves the polytope. Also we slightly modify the affine hull projection to make use of this. Before this ticket: (Run tests twice to obtain the real timinigs. The first time it computes twice to populate the coercion model, see https://groups.google.com/d/msg/sage-devel/UAvbXKSN_JU/vcVN2AVQBQAJ) {{{ sage: P = polytopes.permutahedron(6) sage: %time Q = P.affine_hull_projection() CPU times: user 94.1 ms, sys: 2 µs, total: 94.1 ms Wall time: 93.5 ms sage: P = polytopes.permutahedron(7) sage: %time Q = P.affine_hull_projection() CPU times: user 2.21 s, sys: 1 µs, total: 2.21 s Wall time: 2.21 s sage: P = polytopes.permutahedron(4) sage: %time Q = P.affine_hull_projection(orthonormal=True, extend=True) CPU times: user 1.36 s, sys: 2 µs, total: 1.36 s Wall time: 1.36 s sage: P = polytopes.hypercube(13)*Polyhedron(vertices=[[0]]) sage: %time Q = P.affine_hull_projection() CPU times: user 1.84 s, sys: 5 µs, total: 1.84 s Wall time: 1.84 s }}} With this ticket on top of #29841 (this tickets new implementation uses `CombinatorialPolyhedron` which is much faster obtained with #29841): {{{ sage: P = polytopes.permutahedron(6) sage: %time Q = P.affine_hull_projection() CPU times: user 78.9 ms, sys: 0 ns, total: 78.9 ms Wall time: 77.7 ms sage: P = polytopes.permutahedron(7) sage: %time Q = P.affine_hull_projection() CPU times: user 1.23 s, sys: 35 µs, total: 1.23 s Wall time: 1.23 s sage: P = polytopes.permutahedron(7) sage: P = P.base_extend(P.base_ring(), backend='field') sage: %time Q = P.affine_hull_projection() CPU times: user 366 ms, sys: 3.98 ms, total: 370 ms Wall time: 369 ms sage: P = polytopes.permutahedron(4) sage: %time Q = P.affine_hull_projection(orthonormal=True, extend=True) CPU times: user 187 ms, sys: 10.8 ms, total: 198 ms Wall time: 196 ms sage: P = polytopes.hypercube(13)*Polyhedron(vertices=[[0]]) sage: %time Q = P.affine_hull_projection() CPU times: user 847 ms, sys: 36 µs, total: 848 ms Wall time: 846 ms }}} URL: https://trac.sagemath.org/29843 Reported by: gh-kliem Ticket author(s): Jonathan Kliem Reviewer(s): Matthias Koeppe
- Loading branch information
Showing
1 changed file
with
114 additions
and
15 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