Closed vneiger closed 3 years ago
Commit: 7c9e9a3
Branch pushed to git repo; I updated commit sha1. New commits:
7c9e9a3 | matrix truncate |
Branch pushed to git repo; I updated commit sha1. New commits:
fd88fb1 | minor fixes |
Update:
Branch pushed to git repo; I updated commit sha1. New commits:
ff70518 | shift |
All the listed enhancements have been realized, along with tests and documentation. The methods support uniform actions, and also row-wise or column-wise ones where applicable (i.e. all methods except constant_matrix
and is_constant
).
Regarding naming:
constant_matrix
seems to be preferred over things like constant_term
or constant_coefficient
, since coefficients
and terms
are already existing methods relating to other notionsmatrix_coefficient_of_degree
, which I find too verbose.Things look good for the most part. Two suggestions: 1) for reverse, we should have an option to reverse polynomials wrt its own degree (rather than the degree of the polynomial matrix) when degrees are not specified - perhaps we can add a parameter entry_wise=False; 2) coefficient_matrix might be a less verbose name than matrix_coefficient_of_degree
Thank you for the two suggestions: I followed them for the additional entry_wise
parameter, and for the coefficient_matrix
name (less verbose, and also less confusing than things which would be too close to the coefficients
and terms
methods).
I also simplified the code a bit, since there was harmless but unnecessary lines supposed to handle matrices having zero rows or zero columns (or both).
Ready for second round of reviewing, thank you.
The new changes seem to address the previous comment fully.
Changed branch from u/gh-vneiger/matrix_wise_functions_for_univariate_polynomial_matrices to 2c36a1e
Some polynomial-type operations should be made available matrix-wise:
monic
(make each row-wise/column-wise leading polynomial monic)truncation
(and more generally, mod by a polynomial? careful: mod method exists for this type of objects)shift
(multiplication by power of variable)reverse
(same polynomial with coefficients reversed; here w.r.t to matrix degree but also finer prescribed column-wise or row-wise bounds)To be decided whether this should be added:
is_constant
CC: @ke456
Component: linear algebra
Keywords: polynomial matrix, univariate polynomials
Author: Vincent Neiger
Branch/Commit:
2c36a1e
Reviewer: Seung Gyu Hyun
Issue created by migration from https://trac.sagemath.org/ticket/31471