Skip to content

Commit 80a2c2f

Browse files
committed
Improve tests and clarify docstrings
1 parent b860024 commit 80a2c2f

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

src/sage/matrix/matrix_rational_dense.pyx

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2932,8 +2932,9 @@ cdef class Matrix_rational_dense(Matrix_dense):
29322932
Return the result of running Block Korkin-Zolotarev reduction on
29332933
``self`` interpreted as a lattice.
29342934
2935-
For details on input parameters, see
2936-
:meth:`sage.matrix.matrix_integer_dense.Matrix_integer_dense.BKZ`.
2935+
The arguments ``*args`` and ``**kwargs`` are passed onto
2936+
:meth:`sage.matrix.matrix_integer_dense.Matrix_integer_dense.BKZ`,
2937+
see there for more details.
29372938
29382939
EXAMPLES::
29392940
@@ -2942,6 +2943,11 @@ cdef class Matrix_rational_dense(Matrix_dense):
29422943
[ 1/28 -1/40 -1/18]
29432944
[ 1/28 -1/40 1/18]
29442945
[-1/14 -1/40 0]
2946+
2947+
sage: A = random_matrix(QQ, 10, 10)
2948+
sage: d = lcm(a.denom() for a in A.list())
2949+
sage: A.BKZ() == (A * d).change_ring(ZZ).BKZ() / d
2950+
True
29452951
"""
29462952
A, d = self._clear_denom()
29472953
return A.BKZ(*args, **kwargs) / d
@@ -2951,8 +2957,9 @@ cdef class Matrix_rational_dense(Matrix_dense):
29512957
Return an LLL reduced or approximated LLL reduced lattice for
29522958
``self`` interpreted as a lattice.
29532959
2954-
For details on input parameters, see
2955-
:meth:`sage.matrix.matrix_integer_dense.Matrix_integer_dense.LLL`.
2960+
The arguments ``*args`` and ``**kwargs`` are passed onto
2961+
:meth:`sage.matrix.matrix_integer_dense.Matrix_integer_dense.LLL`,
2962+
see there for more details.
29562963
29572964
EXAMPLES::
29582965
@@ -2961,6 +2968,11 @@ cdef class Matrix_rational_dense(Matrix_dense):
29612968
[ 1/28 -1/40 -1/18]
29622969
[ 1/28 -1/40 1/18]
29632970
[ 0 -3/40 0]
2971+
2972+
sage: A = random_matrix(QQ, 10, 10)
2973+
sage: d = lcm(a.denom() for a in A.list())
2974+
sage: A.LLL() == (A * d).change_ring(ZZ).LLL() / d
2975+
True
29642976
"""
29652977
A, d = self._clear_denom()
29662978
return A.LLL(*args, **kwargs) / d

0 commit comments

Comments
 (0)