Changeset 6ed8c4 in git for kernel/linearAlgebra.h


Ignore:
Timestamp:
Jul 19, 2011, 4:45:41 PM (13 years ago)
Author:
mlee <martinlee84@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
1f637e0cf55bac728426f222f498b81de378e159
Parents:
bb5c2849ef4e9115c1f69238f0aaf689e2be7e2d
git-author:
mlee <martinlee84@web.de>2011-07-19 16:45:41+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:52:40+01:00
Message:
added const ring to some functions in linearAlgebra.* (TODO complete this)
switched on compatibility layers in numbers.h and polys.h
added nGreater macro to numbers.h
commented out lists in ring.h
moved lists dependend functions from linearAlgebra.* to linearAlgebra.cut
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/linearAlgebra.h

    rbb5c28 r6ed8c4  
    5050       matrix &pMat,      /**< [out] the row permutation matrix P   */
    5151       matrix &lMat,      /**< [out] the lower triangular matrix L  */
    52        matrix &uMat       /**< [out] the upper row echelon matrix U */
     52       matrix &uMat,      /**< [out] the upper row echelon matrix U */
     53       const ring r= currRing       /**< [in] current ring */
    5354             );
    5455
     
    6263 **/
    6364int pivotScore(
    64                number n  /**< [in] a non-zero matrix entry */
     65               number n,    /**< [in] a non-zero matrix entry */
     66               const ring r= currRing /**< [in] current ring */
    6567              );
    6668
     
    8789           int* bestR,        /**< [out] address of row index of best
    8890                                         pivot element                  */
    89            int* bestC         /**< [out] address of column index of
     91           int* bestC,        /**< [out] address of column index of
    9092                                         best pivot element             */
     93           const ring r= currRing       /**< [in] current ring */
    9194          );
    9295
     
    108111bool luInverse(
    109112               const matrix aMat, /**< [in]  matrix to be inverted */
    110                matrix &iMat       /**< [out] inverse of aMat if
     113               matrix &iMat,      /**< [out] inverse of aMat if
    111114                                             invertible            */
     115               const ring r=currRing /**< [in] current ring */
    112116              );
    113117
     
    136140                                     triangular form               */
    137141       matrix &iMat,      /**< [out] inverse of uMat if invertible */
    138        bool diagonalIsOne /**< [in]  if true, then all diagonal
     142       bool diagonalIsOne,/**< [in]  if true, then all diagonal
    139143                                     entries of uMat are 1         */
     144       const ring r= currRing /**< [in] current ring */
    140145                              );
    141146
     
    197202       const matrix uMat, /**< [in]  upper right matrix of an LU-
    198203                                     decomposition                */
    199        matrix &iMat       /**< [out] inverse of A if invertible   */
     204       matrix &iMat,      /**< [out] inverse of A if invertible   */
     205       const ring r= currRing
    200206                          );
    201207
     
    215221int luRank(
    216222       const matrix aMat,      /**< [in]  input matrix */
    217        const bool isRowEchelon /**< [in]  if true then aMat is assumed to be
     223       const bool isRowEchelon,/**< [in]  if true then aMat is assumed to be
    218224                                          already in row echelon form */
     225       const ring r= currRing
    219226          );
    220227
     
    337344bool unitMatrix(
    338345       const int n,     /**< [in]  size of the matrix */
    339        matrix &unitMat  /**< [out] the new (nxn) unit matrix */
     346       matrix &unitMat,  /**< [out] the new (nxn) unit matrix */
     347       const ring r= currRing /** [in] current ring */
    340348               );
    341349
     
    457465       matrix &pMat,           /**< [out] the transformation matrix */
    458466       matrix &hessenbergMat,  /**< [out] the Hessenberg form of aMat */
    459        const number tolerance  /**< [in]  accuracy */
     467       const number tolerance, /**< [in]  accuracy */
     468       const ring r
    460469               );
    461470
     
    484493                  );
    485494
    486 /**
    487  * Computes all eigenvalues of a given real quadratic matrix with
    488  * multiplicites.
    489  *
    490  * The method assumes that the current ground field is the complex numbers.
    491  * Computations are based on the QR double shift algorithm involving
    492  * Hessenberg form and householder transformations.
    493  * If the algorithm works, then it returns a list with two entries which
    494  * are again lists of the same size:
    495  * _[1][i] is the i-th mutually distinct eigenvalue that was found,
    496  * _[2][i] is the (int) multiplicity of _[1][i].
    497  * If the algorithm does not work (due to an ill-posed matrix), a list with
    498  * the single entry (int)0 is returned.
    499  * 'tol1' is used for detection of deflation in the actual qr double shift
    500  * algorithm.
    501  * 'tol2' is used for ending Heron's iteration whenever square roots
    502  * are being computed.
    503  * 'tol3' is used to distinguish between distinct eigenvalues: When
    504  * the Euclidean distance between two computed eigenvalues is less then
    505  * tol3, then they will be regarded equal, resulting in a higher
    506  * multiplicity of the corresponding eigenvalue.
    507  *
    508  * @return a list with one entry (int)0, or two entries which are again lists
    509  **/
    510 lists qrDoubleShift(
    511        const matrix A,     /**< [in]  the quadratic matrix         */
    512        const number tol1,  /**< [in]  tolerance for deflation      */
    513        const number tol2,  /**< [in]  tolerance for square roots   */
    514        const number tol3   /**< [in]  tolerance for distinguishing
    515                                       eigenvalues                  */
    516                    );
    517495
    518496/**
Note: See TracChangeset for help on using the changeset viewer.