Changes between Version 1 and Version 2 of Ticket #16116


Ignore:
Timestamp:
04/10/14 09:41:33 (4 years ago)
Author:
jipilab
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16116 – Description

    v1 v2  
    2828The three matrices elmt, m and m2 are the same encoded into 3 different base rings. It would be natural to think that the cyclotomic field be the optimal field to do computations, but it does not seem to be the case in practice.
    2929
    30 Here is a univariate example where I disactivated the verification on cyclotomic fields on line 962 of the file /src/sage/matrix/matrix_space.py to get a matrix_generic_dense instead of matrix_cyclo_dense.
     30Here is a univariate example.
    3131
    3232{{{
     
    4141    sage: f5=(F+~F)/2
    4242    sage: m=matrix(CF,[[-2*f5, 1, 6*f5 + 2],[-2*f5, 2*f5, 4*f5 + 1],[0,0,1]])
     43    sage: type(m)
     44    <type 'sage.matrix.matrix_cyclo_dense.Matrix_cyclo_dense'>
     45    sage: m.parent()
     46    Full MatrixSpace of 3 by 3 dense matrices over Cyclotomic Field of order 10 and degree 4
     47    sage: %timeit m*m
     48    100 loops, best of 3: 1.98 ms per loop
     49}}}
     50
     51Then, I disactivated the verification on cyclotomic fields on line 962 of the file /src/sage/matrix/matrix_space.py to get a matrix_generic_dense instead of matrix_cyclo_dense.
     52
     53{{{
     54    sage: CF.<F>=CyclotomicField(2*5)
     55    sage: f5=(F+~F)/2
     56    sage: m=matrix(CF,[[-2*f5, 1, 6*f5 + 2],[-2*f5, 2*f5, 4*f5 + 1],[0,0,1]])
    4357    sage: m.parent()
    4458    Full MatrixSpace of 3 by 3 dense matrices over Cyclotomic Field of order 10 and degree 4