Changeset 70a952 in git for Singular/iparith.cc


Ignore:
Timestamp:
May 29, 2012, 12:13:49 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
9aac3e40e249db0a2411b4c4f36cdc9a5d791080
Parents:
5998134399af73455bd45b86419f1c2d580ea52d
Message:
fix: matrices in lusolve, ludecomp, luinverse must be constant (from master)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r599813 r70a952  
    44154415     A list [P, L, U] is returned. */
    44164416  matrix mat = (const matrix)v->Data();
     4417  if (!idIsConstant((ideal)mat))
     4418  {
     4419    WerrorS("matrix must be constant");
     4420    return TRUE;
     4421  }
    44174422  matrix pMat;
    44184423  matrix lMat;
     
    68166821        return TRUE;
    68176822      }
     6823      if (!idIsConstant((ideal)aMat))
     6824      {
     6825        WerrorS("matrix must be constant");
     6826        return TRUE;
     6827      }
    68186828      invertible = luInverse(aMat, iMat);
    68196829    }
     
    68366846       return TRUE;
    68376847     }
     6848      if (!idIsConstant((ideal)pMat)
     6849      || (!idIsConstant((ideal)lMat))
     6850      || (!idIsConstant((ideal)uMat))
     6851      )
     6852      {
     6853        WerrorS("matricesx must be constant");
     6854        return TRUE;
     6855      }
    68386856     invertible = luInverseFromLUDecomp(pMat, lMat, uMat, iMat);
    68396857  }
     
    69166934    Werror("third matrix (%d x %d) and vector (%d x 1) do not fit",
    69176935           uMat->rows(), uMat->cols(), bVec->rows());
     6936    return TRUE;
     6937  }
     6938  if (!idIsConstant((ideal)pMat)
     6939  ||(!idIsConstant((ideal)lMat))
     6940  ||(!idIsConstant((ideal)uMat))
     6941  ||(!idIsConstant((ideal)bVec))
     6942  )
     6943  {
     6944    WerrorS("matrices must be constant");
    69186945    return TRUE;
    69196946  }
Note: See TracChangeset for help on using the changeset viewer.