Changeset a5fb9a in git


Ignore:
Timestamp:
Dec 21, 2014, 1:15:48 AM (9 years ago)
Author:
Jakob Kroeker <kroeker@…>
Branches:
(u'spielwiese', 'd0474371d8c5d8068ab70bfb42719c97936b18a6')
Children:
f533f6f7667328bccb271b19b2f603aaebe41596
Parents:
20863c905e3e6d10e3e1e6de5a625a88d4ba28b2
git-author:
Jakob Kroeker <kroeker@math.uni-hannover.de>2014-12-21 01:15:48+01:00
git-committer:
Jakob Kroeker <kroeker@math.uni-hannover.de>2014-12-21 01:17:46+01:00
Message:
fixed lusolve (track issue 358)
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • Tst/Short.lst

    r20863c ra5fb9a  
    3636Short/bug_34.tst
    3737Short/bug_35.tst
     38Short/bug_358.tst
    3839Short/bug_36.tst
    3940Short/bug_37.tst
  • kernel/linear_algebra/linearAlgebra.cc

    r20863c ra5fb9a  
    407407  /* determine whether uMat * xVec = yVec is solvable */
    408408  bool isSolvable = true;
    409   bool isZeroRow; int nonZeroRowIndex;
     409  bool isZeroRow;
     410  int nonZeroRowIndex = 0 ;   // handle case that the matrix is zero
    410411  for (int r = m; r >= 1; r--)
    411412  {
     
    430431       solution space will be. Thus, we start with the possibly too wide
    431432       matrix N and later copy the relevant columns of N into H. */
    432     int nonZeroC; int lastNonZeroC = n + 1;
     433    int nonZeroC  =  0 ;
     434    int lastNonZeroC = n + 1;
     435
    433436    for (int r = nonZeroRowIndex; r >= 1; r--)
    434437    {
    435438      for (nonZeroC = 1; nonZeroC <= n; nonZeroC++)
    436439        if (MATELEM(uMat, r, nonZeroC) != NULL) break;
     440
    437441      for (int w = lastNonZeroC - 1; w >= nonZeroC + 1; w--)
    438442      {
     
    467471      lastNonZeroC = nonZeroC;
    468472    }
     473    for (int w = lastNonZeroC - 1; w >= 1; w--)
     474    {
     475       // remaining variables are free
     476       dim++;
     477       MATELEM(N, w, dim) = pOne();
     478    }
     479
    469480    if (dim == 0)
    470481    {
     
    484495    idDelete((ideal*)&N);
    485496  }
    486 
    487497  idDelete((ideal*)&cVec);
    488498  idDelete((ideal*)&yVec);
Note: See TracChangeset for help on using the changeset viewer.