Opened 13 years ago

Last modified 8 years ago

#8939 needs_work enhancement

matrix classes for flint polynomials

Reported by: Burcin Erocal Owned by: jason, was
Priority: major Milestone: sage-6.4
Component: linear algebra Keywords:
Cc: Martin Albrecht, Jean-Pierre Flori Merged in:
Authors: Burcin Erocal Reviewers: Martin Albrecht
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Attached patch adds templated matrix classes for FLINT's fmpz_poly and zmod_poly structs.

At the moment there is no extra functionality provided by the classes, but fast nullspace (over the fraction field), and hopefully inverse implementations will be coming soon. In any case, this should be a good basis for implementing fast algorithms for these matrices.

Attachments (3)

trac_8939-matrix_template.patch (22.1 KB) - added by Burcin Erocal 13 years ago.
trac_8939-matrix_template-4.4.2.patch (22.2 KB) - added by Burcin Erocal 13 years ago.
rebased to 4.4.2
trac_8939-matrix_template-4.4.2-part2.patch (15.0 KB) - added by Burcin Erocal 12 years ago.
address referee comments

Download all attachments as: .zip

Change History (15)

comment:1 Changed 13 years ago by Burcin Erocal

Status: newneeds_review

Changed 13 years ago by Burcin Erocal

Changed 13 years ago by Burcin Erocal

rebased to 4.4.2

comment:2 Changed 13 years ago by Burcin Erocal

I uploaded a new patch rebased to 4.4.2.

comment:3 Changed 13 years ago by Martin Albrecht

I get one doctest failure with this patch applied on top of 4.4.2:

**********************************************************************
File "/mnt/usb1/scratch/malb/sage-4.4/devel/sage/sage/modules/free_module.py", line 1125:
    sage: V.base_extend(QQ)
Expected:
    Vector space of dimension 7 over Rational Field
Got:
    V

comment:4 Changed 13 years ago by Martin Albrecht

Status: needs_reviewneeds_work

The patch looks good. However, I'd prefer to have a bit more documentation.

  • I think there should be doctests in fmpz_poly_linkage.pxi. I know our policy does not require it, but it seems like a good pplace to put some
  • It would be nice to write a bit about how all the files (templates etc.) relate to each other, e.g. some documentation in matrix_dense_template.pxi which makes it explains a bit how to use it. (I guess I should do the same for the polynomial template thing.)
  • I cannot see the "fast nullspace"

Changed 12 years ago by Burcin Erocal

address referee comments

comment:5 in reply to:  4 Changed 12 years ago by Burcin Erocal

Reviewers: Martin Albrecht
Status: needs_workneeds_review

Replying to malb:

The patch looks good. However, I'd prefer to have a bit more documentation.

  • I think there should be doctests in fmpz_poly_linkage.pxi. I know our policy does not require it, but it seems like a good pplace to put some

Done. I added a new file sage/libs/flint/fmpz_poly_linkage_tests.pyx with python functions wrapping the celement_*() functions. I don't know how to test the celement_{construct,destruct}() functions, so they are omitted.

  • It would be nice to write a bit about how all the files (templates etc.) relate to each other, e.g. some documentation in matrix_dense_template.pxi which makes it explains a bit how to use it. (I guess I should do the same for the polynomial template thing.)

Done, with a brief description at the beginning of matrix_dense_template.pxi.

  • I cannot see the "fast nullspace"

This will be on a different ticket, when I get around to cleaning it up...

comment:6 Changed 12 years ago by Martin Albrecht

Status: needs_reviewneeds_work

This patch bitrotted a lot (sorry for not not reviewing your changes earlier!):

applying trac_8939-matrix_template-4.4.2-part2.patch
patching file module_list.py
Hunk #1 succeeded at 501 with fuzz 2 (offset 18 lines).
unable to find 'sage/libs/flint/fmpz_poly_linkage.pxi' for patching
2 out of 2 hunks FAILED -- saving rejects to file sage/libs/flint/fmpz_poly_linkage.pxi.rej
unable to find 'sage/matrix/matrix_dense_template.pxi' for patching
1 out of 1 hunks FAILED -- saving rejects to file sage/matrix/matrix_dense_template.pxi.rej
patch failed, unable to continue (try -v)
sage/libs/flint/fmpz_poly_linkage.pxi: No such file or directory
sage/matrix/matrix_dense_template.pxi: No such file or directory
patch failed, rejects left in working dir
errors during apply, please fix and refresh trac_8939-matrix_template-4.4.2-part2.patch

comment:7 Changed 9 years ago by Jeroen Demeyer

Milestone: sage-5.11sage-5.12

comment:8 Changed 9 years ago by For batch modifications

Milestone: sage-6.1sage-6.2

comment:9 Changed 9 years ago by Jean-Pierre Flori

Cc: Jean-Pierre Flori added

comment:10 Changed 9 years ago by Marc Mezzarobba

Wouldn't it be better now to wrap fmpz_mat, fmpz_poly_mat, fmpq_mat, nmod_poly_mat instead? Or do we need to do both to preserve existing features?

comment:11 Changed 9 years ago by For batch modifications

Milestone: sage-6.2sage-6.3

comment:12 Changed 8 years ago by For batch modifications

Milestone: sage-6.3sage-6.4
Note: See TracTickets for help on using tickets.