Opened 2 years ago

Closed 2 years ago

#29894 closed enhancement (fixed)

add minimal interface for using ZZ[x]-matrices from flint

Reported by: chapoton Owned by:
Priority: major Milestone: sage-9.2
Component: interfaces Keywords:
Cc: vdelecroix Merged in:
Authors: Frédéric Chapoton Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 1f52255 (Commits, GitHub, GitLab) Commit: 1f52255c43134cf47840466f3ca27fc79bd4e346
Dependencies: Stopgaps:

Status badges


So that one may use this later to compute determinants in this case, for example.

Change History (8)

comment:1 Changed 2 years ago by chapoton

  • Branch set to u/chapoton/29894
  • Commit set to 1f52255c43134cf47840466f3ca27fc79bd4e346
  • Status changed from new to needs_review

New commits:

1f52255introduce minimal interface for using ZZ[x] matrices in Flint

comment:2 Changed 2 years ago by tscrim

Could we add at least one little direct use for this interface, say in computing the determinants as mentioned in the ticket description?

comment:3 Changed 2 years ago by chapoton

ok, I will try to think about it. I had some use case, but it turned out to be slower than the existing method.

comment:4 Changed 2 years ago by tscrim

That is interesting and surprising to me. Bill probably would like to know about that. The flint version might also be asymptotically faster. Plus, I am generally a fan of having multiple implementations available and giving the choice to the user (if for nothing else other than testing).

comment:5 Changed 2 years ago by chapoton

My test case was (for M upper triangular square matrix with 1 on the diagonal)

det(x M^t + M)


charpoly(-M (M^t)^(-1))

and the inversion + product + charpoly was much faster than the det.

Version 0, edited 2 years ago by chapoton (next)

comment:6 Changed 2 years ago by chapoton

maybe useful for Alexander polynomial from Seifert matrix, see #29952

comment:7 Changed 2 years ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

Perhaps that is just a special case of the fact it is a upper unitriangular matrix? Anyways, I am not going to fret over not having a definitive use case at this time. It doesn't hurt anything to have the interface all setup.

comment:8 Changed 2 years ago by vbraun

  • Branch changed from u/chapoton/29894 to 1f52255c43134cf47840466f3ca27fc79bd4e346
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.