Changeset ebbb9c in git


Ignore:
Timestamp:
May 23, 2012, 2:31:59 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '648d28f488f6ff08f5607ff229b9ad9e4a5b93c2')
Children:
a28cb4f3357225d7f8bb8d68a4aa0b0be3ccdd41
Parents:
243404529d5f96ca508e7b74fd54f12c826fdb45
Message:
fix: assign bigint = something should fail for 1x0 matrices
fix: #427, bug in minor
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Singular/MinorInterface.cc

    r243404 rebbb9c  
    101101
    102102  /* the ideal to be returned: */
    103   ideal iii = idInit(1, 0);
     103  ideal iii = idInit(1);
    104104
    105105  bool zeroOk = ((k < 0) ? true : false); /* for k = 0, all minors are requested,
     
    122122     in iii which come after the computed minors */
    123123  ideal jjj;
    124   if (collectedMinors == 0) jjj = idInit(1, 0);
     124  if (collectedMinors == 0) jjj = idInit(1);
    125125  else                      jjj = idCopyFirstK(iii, collectedMinors);
    126126  idDelete(&iii);
     
    155155
    156156  /* the ideal to be returned: */
    157   ideal iii = idInit(1, 0);
     157  ideal iii = idInit(1);
    158158
    159159  bool zeroOk = ((k < 0) ? true : false); /* for k = 0, all minors are
     
    187187     in iii which come after the computed minors */
    188188  ideal jjj;
    189   if (collectedMinors == 0) jjj = idInit(1, 0);
     189  if (collectedMinors == 0) jjj = idInit(1);
    190190  else                      jjj = idCopyFirstK(iii, collectedMinors);
    191191  idDelete(&iii);
     
    327327
    328328  /* the ideal to be returned: */
    329   ideal iii = idInit(1, 0);
     329  ideal iii = idInit(1);
    330330
    331331  bool zeroOk = ((k < 0) ? true : false); /* for k = 0, all minors are
     
    348348     in iii which come after the computed minors */
    349349  ideal jjj;
    350   if (collectedMinors == 0) jjj = idInit(1, 0);
     350  if (collectedMinors == 0) jjj = idInit(1);
    351351  else                      jjj = idCopyFirstK(iii, collectedMinors);
    352352  idDelete(&iii);
     
    384384
    385385  /* the ideal to be returned: */
    386   ideal iii = idInit(1, 0);
     386  ideal iii = idInit(1);
    387387
    388388  bool zeroOk = ((k < 0) ? true : false); /* for k = 0, all minors are
     
    416416     in iii which come after the computed minors */
    417417  ideal jjj;
    418   if (collectedMinors == 0) jjj = idInit(1, 0);
     418  if (collectedMinors == 0) jjj = idInit(1);
    419419  else                      jjj = idCopyFirstK(iii, collectedMinors);
    420420  idDelete(&iii);
     
    531531    else if (currRingIsOverField() && (vars == 3)
    532532             && (currRing->cf->ch >= 2) && (currRing->cf->ch <= 32003))
    533             b = true;
     533          b = true;
    534534  }
    535535  if (!b)
  • Singular/fglm.cc

    r243404 rebbb9c  
    11// emacs edit mode for this file is -*- C++ -*-
    2 // $Id$
    32
    43/****************************************
     
    196195        for ( k= IDELEMS( sring->qideal )-1; k >= 0; k-- )
    197196          (sqind->m)[k]= p_PermPoly( (sring->qideal->m)[k], vperm, sring,
    198                           currRing, nMap);
     197                          currRing, nMap);
    199198        ideal sqindred = kNF( dring->qideal, NULL, sqind );
    200199        if ( ! idIs0( sqindred ) )
     
    215214        for ( k= IDELEMS( dring->qideal )-1; k >= 0; k-- )
    216215          (dqins->m)[k]=p_PermPoly( (dring->qideal->m)[k], dsvperm, sring,
    217                         currRing, nMap);
     216                        currRing, nMap);
    218217        ideal dqinsred = kNF( sring->qideal, NULL, dqins );
    219218        if ( ! idIs0( dqinsred ) )
     
    333332        case FglmIncompatibleRings:
    334333            Werror( "ring %s and current ring are incompatible", first->Name() );
    335             destIdeal= idInit(0,0);
     334            destIdeal= NULL;
    336335            break;
    337336        case FglmNoIdeal:
    338337            Werror( "Can't find ideal %s in ring %s", second->Name(), first->Name() );
    339             destIdeal= idInit(0,0);
     338            destIdeal= NULL;
    340339            break;
    341340        case FglmNotZeroDim:
    342341            Werror( "The ideal %s has to be 0-dimensional", second->Name() );
    343             destIdeal= idInit(0,0);
     342            destIdeal= NULL;
    344343            break;
    345344        case FglmNotReduced:
    346345            Werror( "The ideal %s has to be given by a reduced SB", second->Name() );
    347             destIdeal= idInit(0,0);
     346            destIdeal= NULL;
    348347            break;
    349348        default:
     
    395394        case FglmNotZeroDim:
    396395            Werror( "The ideal %s has to be 0-dimensional", first->Name() );
    397             destIdeal= idInit(0,0);
     396            destIdeal= NULL;
    398397            break;
    399398        case FglmNotReduced:
    400399            Werror( "The poly %s has to be reduced", second->Name() );
    401             destIdeal= idInit(0,0);
     400            destIdeal= NULL;
    402401            break;
    403402        case FglmPolyIsOne:
     
    480479        case FglmNotZeroDim:
    481480            Werror( "The ideal %s has to be 0-dimensional", first->Name() );
    482             destIdeal= idInit(0,0);
     481            destIdeal= NULL;
    483482            break;
    484483        case FglmNotReduced:
    485484            Werror( "The ideal %s has to be reduced", first->Name() );
    486             destIdeal= idInit(0,0);
     485            destIdeal= NULL;
    487486            break;
    488487        default:
  • Singular/iparith.cc

    r243404 rebbb9c  
    39563956    {
    39573957      L->Init(1);
    3958       L->m[0].data=(char *)idInit(0,1);
     3958      L->m[0].data=(char *)idInit(1);
    39593959      L->m[0].rtyp=IDEAL_CMD;
    39603960    }
  • Singular/ipassign.cc

    r243404 rebbb9c  
    12101210  leftv hh=r;
    12111211  int i = 0;
     1212  if (bim->length()==0) { WerrorS("bigintmat is 1x0"); delete bim; return TRUE; }
    12121213  while (hh!=NULL)
    12131214  {
     
    12301231    {
    12311232      bim->set(i++, (number)(hh->Data()));
    1232     } 
     1233    }
    12331234    /*
    12341235    ((hh->Typ() == INTVEC_CMD)
  • Singular/walk_ip.cc

    r243404 rebbb9c  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id$ */
    54/*
    65* ABSTRACT: frwalk: interpreter link
     
    122121          Werror("ring %s and current ring are incompatible\n",
    123122                 first->Name() );
    124           destIdeal= idInit(0,0);
     123          destIdeal= NULL;
    125124          break;
    126125
    127126        case WalkIncompatibleDestRing:
    128127          Werror( "Order of basering not allowed,\n must be a combination of a,A,lp,dp,Dp,wp,Wp,M and C.\n");
    129           destIdeal= idInit(0,0);
     128          destIdeal= NULL;
    130129          break;
    131130
     
    133132          Werror( "Order of %s not allowed,\n must be a combination of a,A,lp,dp,Dp,wp,Wp,M and C.\n",first->Name());
    134133          rChangeCurrRing(destRing);
    135           destIdeal= idInit(0,0);
     134          destIdeal= NULL;
    136135          break;
    137136
     
    139138          Werror( "Can't find ideal %s in ring %s.\n",
    140139                   second->Name(), first->Name() );
    141           destIdeal= idInit(0,0);
     140          destIdeal= NULL;
    142141          break;
    143142
    144143        case WalkOverFlowError:
    145144          Werror( "Overflow occured.\n");
    146           destIdeal= idInit(0,0);
     145          destIdeal= NULL;
    147146          break;
    148147
    149148        default:
    150            destIdeal= idInit(1,1);
     149           destIdeal= NULL;
    151150    }
    152151
     
    234233                     first->Name() );
    235234            rChangeCurrRing(destRing);
    236             destIdeal= idInit(0,0);
     235            destIdeal= NULL;
    237236            return destIdeal;
    238237            break;
     
    241240            Werror( "Order of basering not allowed,\n must be a combination of lp,dp,Dp,wp,Wp and C or just M.\n");
    242241            rChangeCurrRing(destRing);
    243             destIdeal= idInit(0,0);
     242            destIdeal= NULL;
    244243            return destIdeal;
    245244            break;
     
    249248                     first->Name());
    250249            rChangeCurrRing(destRing);
    251             destIdeal= idInit(0,0);
     250            destIdeal= NULL;
    252251            return destIdeal;
    253252            break;
     
    257256                     second->Name(), first->Name() );
    258257            rChangeCurrRing(destRing);
    259             destIdeal= idInit(0,0);
     258            destIdeal= NULL;
    260259            return destIdeal;
    261260            break;
     
    264263            Werror( "Overflow occured in ring %s.\n", first->Name() );
    265264            rChangeCurrRing(destRing);
    266             destIdeal= idInit(0,0);
     265            destIdeal= NULL;
    267266            return destIdeal;
    268267            break;
  • libpolys/coeffs/bigintmat.h

    r243404 rebbb9c  
    9999    void inpMult(number bintop, const coeffs C = NULL);
    100100
     101    inline int length() { return col*row; }
    101102    inline int  cols() const { return col; }
    102103    inline int  rows() const { return row; }
Note: See TracChangeset for help on using the changeset viewer.