#29838 closed enhancement (fixed)

Implement slack matrix for polyhedra

Reported by: gh-kliem Owned by:
Priority: major Milestone: sage-9.2
Component: geometry Keywords: polyhedra, slack matrix
Cc: jipilab, gh-LaisRast Merged in:
Authors: Jonathan Kliem Reviewers: Matthias Koeppe
Report Upstream: N/A Work issues:
Branch: 47a19c6 (Commits, GitHub, GitLab) Commit: 47a19c6c02206602f0bb8285ef3ff6c78c23b0fe
Dependencies: Stopgaps:

Status badges

Description

We implement the slack matrix for polyhedra.

This matrix contains all the evaluations of Hrepresentation elements on Vrepresentation elements.

This method can be used to obtain the incidence matrix much quicker (at least for base ring rationals or integers).

Change History (4)

comment:1 Changed 10 months ago by gh-kliem

  • Branch set to public/29838
  • Commit set to 47a19c6c02206602f0bb8285ef3ff6c78c23b0fe
  • Status changed from new to needs_review

New commits:

47a19c6implement slack matrix

comment:2 Changed 10 months ago by gh-kliem

To obtain the slack matrix is currently much quicker than the incidence matrix:

sage: P = polytopes.permutahedron(7)
sage: %time M = P.slack_matrix()
CPU times: user 46.5 ms, sys: 4.06 ms, total: 50.6 ms
Wall time: 49.6 ms
sage: %time _ = P.incidence_matrix()
CPU times: user 684 ms, sys: 0 ns, total: 684 ms
Wall time: 683 ms

sage: P = polytopes.permutahedron(7)
sage: P = P.base_extend(QQ)
sage: %time M = P.slack_matrix()
CPU times: user 157 ms, sys: 4.01 ms, total: 161 ms
Wall time: 160 ms
sage: %time _ = P.incidence_matrix()
CPU times: user 1.2 s, sys: 17 µs, total: 1.2 s
Wall time: 1.2 s

sage: P = polytopes.associahedron(['A', 9])
sage: %time M = P.slack_matrix()
CPU times: user 312 ms, sys: 8 ms, total: 320 ms
Wall time: 319 ms
sage: %time _ = P.incidence_matrix()
CPU times: user 1.83 s, sys: 0 ns, total: 1.83 s
Wall time: 1.83 s

comment:3 Changed 10 months ago by mkoeppe

  • Reviewers set to Matthias Koeppe
  • Status changed from needs_review to positive_review

LGTM

comment:4 Changed 10 months ago by vbraun

  • Branch changed from public/29838 to 47a19c6c02206602f0bb8285ef3ff6c78c23b0fe
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.