Ticket #1794: 8014.patch

File 8014.patch, 2.7 KB (added by wjp, 14 years ago)
  • sage/matrix/matrix2.pyx

    # HG changeset patch
    # User Willem Jan Palenstijn <wpalenst@math.leidenuniv.nl>
    # Date 1200505917 -3600
    # Node ID 6f44051873a8dafd1fb829edf30ff3da4b552e38
    # Parent  1e63b45b9dca6743a1f14ce6b2f02f72111859b3
    Gramm-Schmidt -> Gram-Schmidt
    
    diff -r 1e63b45b9dca -r 6f44051873a8 sage/matrix/matrix2.pyx
    a b cdef class Matrix(matrix1.Matrix): 
    29732973        """
    29742974        return self.__invert__()
    29752975
    2976     def gramm_schmidt(self):
     2976    def gram_schmidt(self):
    29772977        r"""
    29782978        Return the matrix G whose rows are obtained from the rows of self (=A) by
    2979         applying the Gramm-Schmidt orthogonalization process.  Also return
     2979        applying the Gram-Schmidt orthogonalization process.  Also return
    29802980        the coefficients mu ij, i.e., a matrix mu such that \code{(mu + 1)*G == A}.
    29812981
    29822982        OUTPUT:
    cdef class Matrix(matrix1.Matrix): 
    29892989            [ -1   2   5]
    29902990            [-11   1   1]
    29912991            [  1  -1  -3]
    2992             sage: G, mu = A.gramm_schmidt()
     2992            sage: G, mu = A.gram_schmidt()
    29932993            sage: G
    29942994            [     -1       2       5]
    29952995            [  -52/5    -1/5      -2]
    cdef class Matrix(matrix1.Matrix): 
    30093009            sage: (mu + 1)*G == A
    30103010            True
    30113011        """       
    3012         from sage.modules.misc import gramm_schmidt
     3012        from sage.modules.misc import gram_schmidt
    30133013        from constructor import matrix
    3014         Bstar, mu = gramm_schmidt(self.rows())
     3014        Bstar, mu = gram_schmidt(self.rows())
    30153015        return matrix(Bstar), mu
    30163016
    30173017   
  • sage/modules/misc.py

    diff -r 1e63b45b9dca -r 6f44051873a8 sage/modules/misc.py
    a b AUTHORS: 
    1414
    1515from sage.matrix.constructor import matrix
    1616
    17 def gramm_schmidt(B):
     17def gram_schmidt(B):
    1818    """
    19     Return the Gramm-Schmidt orthogonalization of the entries in the list
    20     B of vectors, along with the matrix mu of Gramm-Schmidt coefficients.
     19    Return the Gram-Schmidt orthogonalization of the entries in the list
     20    B of vectors, along with the matrix mu of Gram-Schmidt coefficients.
    2121
    2222    Note that the output vectors need not have unit length. We do this
    2323    to avoid having to extract square roots.
    2424
    2525    EXAMPLES:
    2626        sage: B = [vector([1,2,1/5]), vector([1,2,3]), vector([-1,0,0])]
    27         sage: from sage.modules.misc import gramm_schmidt
    28         sage: G, mu = gramm_schmidt(B)
     27        sage: from sage.modules.misc import gram_schmidt
     28        sage: G, mu = gram_schmidt(B)
    2929        sage: G
    3030        [(1, 2, 1/5), (-1/9, -2/9, 25/9), (-4/5, 2/5, 0)]
    3131        sage: G[0] * G[1]