On Tue, Jul 10, 2012 at 9:21 AM, Keshav Kini <keshav.k...@gmail.com> wrote:
> Julien Puydt <julien.pu...@laposte.net> writes:
>> Le 10/07/2012 09:19, Jeroen Demeyer a écrit :
>>> On 2012-07-10 06:47, William Stein wrote:
>>>> Seriously?  You guys actually *want* a single 20,000 line Cython file?
>>>> Why?   The only argument you are giving is that you can't remember
>>>> which file something is in, so let's just put everything in one
>>>> massive file.   I'm clearly missing something.
>>>
>>> +1 to William.  Usually, when files are so large, it's because of bad
>>> design.  Perhaps matrix0, matrix1, matrix2 is also bad design, but
>>> having just one matrix file would also be bad design.
>>
>> +1 to that.
>>
>> Names matrix0, matrix1 and matrix2 look bad. Isn't it possible to give
>> more informative names?
>
> Have you looked at the files? What names would you suggest?
>
> -Keshav

Here they are.  Start grouping.

blastoff:matrix wstein$ grep "^    def " matrix[0-2].pyx
matrix0.pyx:    def __init__(self, parent):
matrix0.pyx:    def copy(self):
matrix0.pyx:    def list(self):
matrix0.pyx:    def _list(self):
matrix0.pyx:    def dict(self):
matrix0.pyx:    def _dict(self):
matrix0.pyx:    def _clear_cache(self):
matrix0.pyx:    def _get_cache(self):
matrix0.pyx:    def set_immutable(self):
matrix0.pyx:    def is_immutable(self):
matrix0.pyx:    def is_mutable(self):
matrix0.pyx:    def __iter__(self):
matrix0.pyx:    def __getitem__(self, key):
matrix0.pyx:    def __setitem__(self, key, value):
matrix0.pyx:    def __reduce__(self):
matrix0.pyx:    def _pickle(self):
matrix0.pyx:    def _test_reduce(self, **options):
matrix0.pyx:    def base_ring(self):
matrix0.pyx:    def change_ring(self, ring):
matrix0.pyx:    def _test_change_ring(self, **options):
matrix0.pyx:    def _matrix_(self, R):
matrix0.pyx:    def __repr__(self):
matrix0.pyx:    def str(self, rep_mapping=None, zero=None,
plus_one=None, minus_one=None):
matrix0.pyx:    def _latex_(self):
matrix0.pyx:    def ncols(self):
matrix0.pyx:    def nrows(self):
matrix0.pyx:    def dimensions(self):
matrix0.pyx:    def act_on_polynomial(self, f):
matrix0.pyx:    def __call__(self, *args, **kwargs):
matrix0.pyx:    def commutator(self, other):
matrix0.pyx:    def swap_columns(self, Py_ssize_t c1, Py_ssize_t c2):
matrix0.pyx:    def with_swapped_columns(self, c1, c2):
matrix0.pyx:    def swap_rows(self, r1, r2):
matrix0.pyx:    def with_swapped_rows(self, r1, r2):
matrix0.pyx:    def add_multiple_of_row(self, Py_ssize_t i, Py_ssize_t
j,    s,   Py_ssize_t start_col=0):
matrix0.pyx:    def with_added_multiple_of_row(self, Py_ssize_t i,
Py_ssize_t j,    s,   Py_ssize_t start_col=0):
matrix0.pyx:    def add_multiple_of_column(self, Py_ssize_t i,
Py_ssize_t j, s, Py_ssize_t start_row=0):
matrix0.pyx:    def with_added_multiple_of_column(self, Py_ssize_t i,
Py_ssize_t j,    s,   Py_ssize_t start_row=0):
matrix0.pyx:    def rescale_row(self, Py_ssize_t i, s, Py_ssize_t start_col=0):
matrix0.pyx:    def with_rescaled_row(self, Py_ssize_t i, s,
Py_ssize_t start_col=0):
matrix0.pyx:    def rescale_col(self, Py_ssize_t i, s, Py_ssize_t start_row=0):
matrix0.pyx:    def with_rescaled_col(self, Py_ssize_t i, s,
Py_ssize_t start_row=0):
matrix0.pyx:    def set_row_to_multiple_of_row(self, Py_ssize_t i,
Py_ssize_t j, s):
matrix0.pyx:    def with_row_set_to_multiple_of_row(self, Py_ssize_t
i, Py_ssize_t j, s):
matrix0.pyx:    def set_col_to_multiple_of_col(self, Py_ssize_t i,
Py_ssize_t j, s):
matrix0.pyx:    def with_col_set_to_multiple_of_col(self, Py_ssize_t
i, Py_ssize_t j, s):
matrix0.pyx:    def
_set_row_to_negative_of_row_of_A_using_subset_of_columns(self,
Py_ssize_t i, Matrix A,
matrix0.pyx:    def mutate(self, Py_ssize_t k ):
matrix0.pyx:    def _travel_column( self, dict d, int k, int sign, positive ):
matrix0.pyx:    def _check_symmetrizability(self, return_diag=False,
skew=False, positive=True):
matrix0.pyx:    def linear_combination_of_rows(self, v):
matrix0.pyx:    def linear_combination_of_columns(self, v):
matrix0.pyx:    def is_symmetric(self):
matrix0.pyx:    def is_hermitian(self):
matrix0.pyx:    def is_skew_symmetric(self):
matrix0.pyx:    def is_symmetrizable(self, return_diag=False, positive=True):
matrix0.pyx:    def is_skew_symmetrizable(self, return_diag=False,
positive=True):
matrix0.pyx:    def is_dense(self):
matrix0.pyx:    def is_sparse(self):
matrix0.pyx:    def is_square(self):
matrix0.pyx:    def is_invertible(self):
matrix0.pyx:    def is_singular(self):
matrix0.pyx:    def pivots(self):
matrix0.pyx:    def rank(self):
matrix0.pyx:    def nonpivots(self):
matrix0.pyx:    def nonzero_positions(self, copy=True, column_order=False):
matrix0.pyx:    def _nonzero_positions_by_row(self, copy=True):
matrix0.pyx:    def _nonzero_positions_by_column(self, copy=True):
matrix0.pyx:    def nonzero_positions_in_column(self, Py_ssize_t i):
matrix0.pyx:    def nonzero_positions_in_row(self, Py_ssize_t i):
matrix0.pyx:    def multiplicative_order(self):
matrix0.pyx:    def iterates(self, v, n, rows=True):
matrix0.pyx:    def __mod__(self, p):
matrix0.pyx:    def mod(self, p):
matrix0.pyx:    def __neg__(self):
matrix0.pyx:    def __invert__(self):
matrix0.pyx:    def __pos__(self):
matrix0.pyx:    def __pow__(self, n, ignored):
matrix0.pyx:    def __hash__(self):
matrix0.pyx:    def __nonzero__(self):
matrix1.pyx:    def _pari_init_(self):
matrix1.pyx:    def _pari_(self):
matrix1.pyx:    def _gap_init_(self):
matrix1.pyx:    def _giac_init_(self):
matrix1.pyx:    def _maxima_init_(self):
matrix1.pyx:    def _mathematica_init_(self):
matrix1.pyx:    def _magma_init_(self, magma):
matrix1.pyx:    def _maple_init_(self):
matrix1.pyx:    def _singular_(self, singular=None):
matrix1.pyx:    def _macaulay2_(self, macaulay2=None):
matrix1.pyx:    def _scilab_init_(self):
matrix1.pyx:    def _scilab_(self, scilab=None):
matrix1.pyx:    def _sage_input_(self, sib, coerce):
matrix1.pyx:    def numpy(self, dtype=None):
matrix1.pyx:    def matrix_over_field(self):
matrix1.pyx:    def lift(self):
matrix1.pyx:    def columns(self, copy=True):
matrix1.pyx:    def rows(self, copy=True):
matrix1.pyx:    def dense_columns(self, copy=True):
matrix1.pyx:    def dense_rows(self, copy=True):
matrix1.pyx:    def sparse_columns(self, copy=True):
matrix1.pyx:    def sparse_rows(self, copy=True):
matrix1.pyx:    def column(self, Py_ssize_t i, from_list=False):
matrix1.pyx:    def row(self, Py_ssize_t i, from_list=False):
matrix1.pyx:    def stack(self, bottom, subdivide=False):
matrix1.pyx:    def augment(self, right, subdivide=False):
matrix1.pyx:    def matrix_from_columns(self, columns):
matrix1.pyx:    def matrix_from_rows(self, rows):
matrix1.pyx:    def matrix_from_rows_and_columns(self, rows, columns):
matrix1.pyx:    def submatrix(self, Py_ssize_t row=0, Py_ssize_t col=0,
matrix1.pyx:    def set_row(self, row, v):
matrix1.pyx:    def set_column(self, col, v):
matrix1.pyx:    def dense_matrix(self):
matrix1.pyx:    def sparse_matrix(self):
matrix1.pyx:    def matrix_space(self, nrows=None, ncols=None, sparse=None):
matrix1.pyx:    def new_matrix(self, nrows=None, ncols=None, entries=None,
matrix1.pyx:    def block_sum(self, Matrix other):
matrix2.pyx:    def _backslash_(self, B):
matrix2.pyx:    def subs(self, in_dict=None, **kwds):
matrix2.pyx:    def solve_left(self, B, check=True):
matrix2.pyx:    def solve_right(self, B, check=True):
matrix2.pyx:    def _solve_right_nonsingular_square(self, B, check_rank=True):
matrix2.pyx:    def pivot_rows(self):
matrix2.pyx:    def _solve_right_general(self, B, check=True):
matrix2.pyx:    def prod_of_row_sums(self, cols):
matrix2.pyx:    def elementwise_product(self, right):
matrix2.pyx:    def permanent(self):
matrix2.pyx:    def permanental_minor(self, Py_ssize_t k):
matrix2.pyx:    def rook_vector(self, check = False):
matrix2.pyx:    def minors(self,k):
matrix2.pyx:    def determinant(self, algorithm=None):
matrix2.pyx:    def det(self, *args, **kwds):
matrix2.pyx:    def __abs__(self):
matrix2.pyx:    def characteristic_polynomial(self, *args, **kwds):
matrix2.pyx:    def minimal_polynomial(self, var='x', **kwds):
matrix2.pyx:    def minpoly(self, var='x', **kwds):
matrix2.pyx:    def charpoly(self, var = 'x', algorithm = None):
matrix2.pyx:    def _charpoly_df(self, var = 'x'):
matrix2.pyx:    def _charpoly_over_number_field(self, var='x'):
matrix2.pyx:    def fcp(self, var='x'):
matrix2.pyx:    def denominator(self):
matrix2.pyx:    def diagonal(self):
matrix2.pyx:    def trace(self):
matrix2.pyx:    def trace_of_product(self, Matrix other):
matrix2.pyx:    def hessenberg_form(self):
matrix2.pyx:    def hessenbergize(self):
matrix2.pyx:    def _charpoly_hessenberg(self, var):
matrix2.pyx:    def left_nullity(self):
matrix2.pyx:    def right_nullity(self):
matrix2.pyx:    def _right_kernel_matrix_over_number_field(self):
matrix2.pyx:    def _right_kernel_matrix_over_field(self, *args, **kwds):
matrix2.pyx:    def _right_kernel_matrix_over_domain(self):
matrix2.pyx:    def right_kernel_matrix(self, *args, **kwds):
matrix2.pyx:    def right_kernel(self, *args, **kwds):
matrix2.pyx:    def left_kernel(self, *args, **kwds):
matrix2.pyx:    def kernel_on(self, V, poly=None, check=True):
matrix2.pyx:    def integer_kernel(self, ring=ZZ):
matrix2.pyx:    def image(self):
matrix2.pyx:    def _row_ambient_module(self, base_ring=None):
matrix2.pyx:    def row_module(self, base_ring=None):
matrix2.pyx:    def row_space(self, base_ring=None):
matrix2.pyx:    def _column_ambient_module(self):
matrix2.pyx:    def column_module(self):
matrix2.pyx:    def column_space(self):
matrix2.pyx:    def decomposition(self, algorithm='spin',
matrix2.pyx:    def _decomposition_spin_generic(self, is_diagonalizable=False):
matrix2.pyx:    def _decomposition_using_kernels(self,
is_diagonalizable=False, dual=False):
matrix2.pyx:    def decomposition_of_subspace(self, M, check_restrict
= True, **kwds):
matrix2.pyx:    def restrict(self, V, check=True):
matrix2.pyx:    def restrict_domain(self, V):
matrix2.pyx:    def restrict_codomain(self, V):
matrix2.pyx:    def maxspin(self, v):
matrix2.pyx:    def wiedemann(self, i, t=0):
matrix2.pyx:    def _eigenspace_format(self, format):
matrix2.pyx:    def eigenspaces_left(self, format='all', var='a',
algebraic_multiplicity=False):
matrix2.pyx:    def eigenspaces_right(self, format='all', var='a',
algebraic_multiplicity=False):
matrix2.pyx:    def eigenvalues(self,extend=True):
matrix2.pyx:    def eigenvectors_left(self,extend=True):
matrix2.pyx:    def eigenvectors_right(self, extend=True):
matrix2.pyx:    def eigenmatrix_left(self):
matrix2.pyx:    def eigenmatrix_right(self):
matrix2.pyx:    def rref(self, *args, **kwds):
matrix2.pyx:    def _echelonize_ring(self, **kwds):
matrix2.pyx:    def echelonize(self, algorithm="default", cutoff=0, **kwds):
matrix2.pyx:    def echelon_form(self, algorithm="default", cutoff=0, **kwds):
matrix2.pyx:    def _echelon_classical(self):
matrix2.pyx:    def _echelon_in_place_classical(self):
matrix2.pyx:    def extended_echelon_form(self, subdivide=False, **kwds):
matrix2.pyx:    def weak_popov_form(self, ascend=True):
matrix2.pyx:    def _multiply_strassen(self, Matrix right, int cutoff=0):
matrix2.pyx:    def _echelon_strassen(self, int cutoff=0):
matrix2.pyx:    def set_block(self, row, col, block):
matrix2.pyx:    def subdivide(self, row_lines=None, col_lines=None):
matrix2.pyx:    def subdivision(self, i, j):
matrix2.pyx:    def subdivision_entry(self, i, j, x, y):
matrix2.pyx:    def _subdivide_on_augment(self, left, right):
matrix2.pyx:    def _subdivide_on_stack(self, top, bottom):
matrix2.pyx:    def subdivisions(self):
matrix2.pyx:    def tensor_product(self, A, subdivide=True):
matrix2.pyx:    def randomize(self, density=1, nonzero=False, *args, **kwds):
matrix2.pyx:    def is_one(self):
matrix2.pyx:    def is_scalar(self, a = None):
matrix2.pyx:    def is_unitary(self):
matrix2.pyx:    def is_bistochastic(self, normalized = True):
matrix2.pyx:    def is_normal(self):
matrix2.pyx:    def as_sum_of_permutations(self):
matrix2.pyx:    def visualize_structure(self, filename=None, maxsize=512):
matrix2.pyx:    def density(self):
matrix2.pyx:    def inverse(self):
matrix2.pyx:    def adjoint(self):
matrix2.pyx:    def _adjoint(self):
matrix2.pyx:    def QR(self, full=True):
matrix2.pyx:    def _gram_schmidt_noscale(self):
matrix2.pyx:    def gram_schmidt(self, orthonormal=False):
matrix2.pyx:    def jordan_form(self, base_ring=None, sparse=False,
subdivide=True, transformation=False):
matrix2.pyx:    def is_diagonalizable(self, base_field=None):
matrix2.pyx:    def is_similar(self, other, transformation=False):
matrix2.pyx:    def symplectic_form(self):
matrix2.pyx:    def cholesky_decomposition(self):
matrix2.pyx:    def _cholesky_decomposition_(self):
matrix2.pyx:    def LU(self, pivot=None, format='plu'):
matrix2.pyx:    def hadamard_bound(self):
matrix2.pyx:    def find(self,f, indices=False):
matrix2.pyx:    def conjugate(self):
matrix2.pyx:    def conjugate_transpose(self):
matrix2.pyx:    def norm(self, p=2):
matrix2.pyx:    def _numerical_approx(self,prec=None,digits=None):
matrix2.pyx:    def plot(self, *args, **kwds):
matrix2.pyx:    def derivative(self, *args):
matrix2.pyx:    def exp(self):
matrix2.pyx:    def elementary_divisors(self):
matrix2.pyx:    def smith_form(self):
matrix2.pyx:    def hermite_form(self, include_zero_rows=True,
transformation=False):
matrix2.pyx:    def _echelon_form_PID(self):
matrix2.pyx:    def _zigzag_form(self, basis=True):
matrix2.pyx:    def zigzag_form(self, subdivide=True, transformation=False):
matrix2.pyx:    def rational_form(self, format='right', subdivide=True):
blastoff:matrix wstein$ grep "^    cpdef " matrix[0-2].pyx
matrix0.pyx:    cpdef ModuleElement _add_(self, ModuleElement right):
matrix0.pyx:    cpdef ModuleElement _sub_(self, ModuleElement right):
matrix0.pyx:    cpdef ModuleElement _rmul_(self, RingElement left):
matrix0.pyx:    cpdef ModuleElement _lmul_(self, RingElement right):
matrix2.pyx:    cpdef matrix_window(self, Py_ssize_t row=0, Py_ssize_t col=0,
blastoff:matrix wstein$ grep "^    cdef " matrix[0-2].pyx
matrix0.pyx:    cdef clear_cache(self):
matrix0.pyx:    cdef fetch(self, key):
matrix0.pyx:    cdef cache(self, key, x):
matrix0.pyx:    cdef check_bounds(self, Py_ssize_t i, Py_ssize_t j):
matrix0.pyx:    cdef check_mutability(self):
matrix0.pyx:    cdef check_bounds_and_mutability(self, Py_ssize_t i,
Py_ssize_t j):
matrix0.pyx:    cdef set_unsafe(self, Py_ssize_t i, Py_ssize_t j, object x):
matrix0.pyx:    cdef get_unsafe(self, Py_ssize_t i, Py_ssize_t j):
matrix0.pyx:    cdef _coerce_element(self, x):
matrix0.pyx:    cdef check_row_bounds_and_mutability(self, Py_ssize_t
r1, Py_ssize_t r2):
matrix0.pyx:    cdef check_column_bounds_and_mutability(self,
Py_ssize_t c1, Py_ssize_t c2):
matrix0.pyx:    cdef swap_columns_c(self, Py_ssize_t c1, Py_ssize_t c2):
matrix0.pyx:    cdef swap_rows_c(self, Py_ssize_t r1, Py_ssize_t r2):
matrix0.pyx:    cdef add_multiple_of_row_c(self, Py_ssize_t i,
Py_ssize_t j,    s,   Py_ssize_t start_col):
matrix0.pyx:    cdef add_multiple_of_column_c(self, Py_ssize_t i,
Py_ssize_t j, s, Py_ssize_t start_row):
matrix0.pyx:    cdef rescale_row_c(self, Py_ssize_t i, s, Py_ssize_t start_col):
matrix0.pyx:    cdef rescale_col_c(self, Py_ssize_t i, s, Py_ssize_t start_row):
matrix0.pyx:    cdef _set_pivots(self, X):
matrix0.pyx:    cdef Vector _vector_times_matrix_(self, Vector v):
matrix0.pyx:    cdef Vector _matrix_times_vector_(self, Vector v):
matrix0.pyx:    cdef sage.structure.element.Matrix
_matrix_times_matrix_(self, sage.structure.element.Matrix right):
matrix0.pyx:    cdef bint _will_use_strassen(self, Matrix right) except -2:
matrix0.pyx:    cdef bint _will_use_strassen_echelon(self) except -2:
matrix0.pyx:    cdef long _hash(self) except -1:
matrix0.pyx:    cdef int _cmp_c_impl(left,Element right) except -2:
matrix0.pyx:    cdef int _strassen_default_cutoff(self, Matrix right) except -2:
matrix0.pyx:    cdef int _strassen_default_echelon_cutoff(self) except -2:
matrix0.pyx:    cdef Matrix A
matrix2.pyx:    cdef _det_by_minors(self, Py_ssize_t level):
matrix2.pyx:    cdef Py_ssize_t j, temp
matrix2.pyx:    cdef Py_ssize_t i

-- 
-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to