Changeset 4fc824e in git


Ignore:
Timestamp:
Mar 26, 2001, 11:15:26 PM (22 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '8d54773d6c9e2f1d2593a28bc68b7eeab54ed529')
Children:
bf4997b6efb6a0d9e3332369c2de3f6e6cee60d8
Parents:
355f86ae1e09b962323c4d49da60c5aa3a7eb6c5
Message:
hannes: syntax/package loading


git-svn-id: file:///usr/local/Singular/svn/trunk@5344 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Singular/eigenval.cc

    r355f86 r4fc824e  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: eigenval.cc,v 1.3 2001-03-22 19:10:59 Singular Exp $ */
     4/* $Id: eigenval.cc,v 1.4 2001-03-26 21:15:26 Singular Exp $ */
    55/*
    66* ABSTRACT: eigenvalues of constant square matrices
     
    4343  if(MATELEM(M,i,k)==NULL||MATELEM(M,j,k)==NULL)
    4444    return M;
    45   number n=nDiv(nCopy(pGetCoeff(MATELEM(M,i,k))),
    46                 nCopy(pGetCoeff(MATELEM(M,j,k))));
     45  number n=nDiv(pGetCoeff(MATELEM(M,i,k)),
     46                pGetCoeff(MATELEM(M,j,k)));
    4747  for(int l=1;l<=MATCOLS(M);l++)
    4848  {
     
    6161  if(MATELEM(M,k,i)==NULL||MATELEM(M,k,j)==NULL)
    6262    return M;
    63   number n=nDiv(nCopy(pGetCoeff(MATELEM(M,k,i))),
    64                 nCopy(pGetCoeff(MATELEM(M,k,j))));
     63  number n=nDiv(pGetCoeff(MATELEM(M,k,i)),
     64                pGetCoeff(MATELEM(M,k,j)));
    6565  for(int l=1;l<=MATROWS(M);l++)
    6666  {
     
    8181  {
    8282    int j=k+1;
    83     while(j<=n&&MATELEM(M,j,k)==NULL)
    84     {
    85       j++;
    86     }
     83    while(j<=n&&MATELEM(M,j,k)==NULL) j++;
    8784    if(j<=n)
    8885    {
     
    9491    }
    9592    j=k+1;
    96     while(j<=n&&MATELEM(M,k,j)==NULL)
    97     {
    98       j++;
    99     }
     93    while(j<=n&&MATELEM(M,k,j)==NULL) j++;
    10094    if(j<=n)
    10195    {
     
    182176      poly t=pOne();
    183177      pSetExp(t,1,1);
     178      pSetm(t);
    184179      poly d0=pSub(MATELEM(M,j,j),t);
    185180      MATELEM(M,j,j)=NULL;
     
    193188        poly t=pOne();
    194189        pSetExp(t,1,1);
     190        pSetm(t);
    195191        d0=pSub(pMult(d0,pSub(MATELEM(M,j,j),t)),
    196192                pMult(pMult(d2,MATELEM(M,j-1,j)),MATELEM(M,j,j-1)));
     
    222218        {
    223219          pp=p;
    224           p=pNSet(nNeg(nDiv(nCopy(pGetCoeff(p0)),nCopy(pGetCoeff(p1)))));
     220          p=pNSet(nNeg(nDiv(pGetCoeff(p0),pGetCoeff(p1))));
    225221          pDelete(&pp);
    226222        }
     
    241237BOOLEAN tridiag(leftv res,leftv h)
    242238{
    243   if(h!=NULL&&h->Typ()==MATRIX_CMD)
     239  if((h!=NULL) && (h->Typ()==MATRIX_CMD))
    244240  {
    245241    matrix M=(matrix)h->Data();
     
    253249  }
    254250  WerrorS("<matrix> expected");
     251  return TRUE;
    255252}
    256253
    257254BOOLEAN eigenval(leftv res,leftv h)
    258255{
    259   if(h!=NULL&&h->Typ()==MATRIX_CMD)
     256  if((h!=NULL) && (h->Typ()==MATRIX_CMD))
    260257  {
    261258    matrix M=(matrix)h->Data();
     
    269266  }
    270267  WerrorS("<matrix> expected");
    271 }
    272 
     268  return TRUE;
     269}
    273270#endif
  • Singular/iparith.cc

    r355f86 r4fc824e  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iparith.cc,v 1.261 2001-03-26 19:30:20 Singular Exp $ */
     4/* $Id: iparith.cc,v 1.262 2001-03-26 21:15:24 Singular Exp $ */
    55
    66/*
     
    716716          return TRUE;
    717717        }
     718        syMake(u,u->name,NULL);
    718719        // else: use next case !!! no break !!!
    719720
     
    52495250    while(v->next!=NULL)
    52505251    {
    5251       nok = iiInternalExport(v->next, 0, u->data);
     5252      nok = iiInternalExport(v->next, 0, (idhdl)u->data);
    52525253      if(nok) return nok;
    52535254      v = v->next;
  • Singular/ipid.cc

    r355f86 r4fc824e  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipid.cc,v 1.47 2001-03-26 19:30:21 Singular Exp $ */
     4/* $Id: ipid.cc,v 1.48 2001-03-26 21:15:23 Singular Exp $ */
    55
    66/*
     
    955955#ifdef HAVE_NAMESPACES
    956956      *pck =namespaceroot->get(p, myynest, TRUE); // search in toplevel namespace
    957       namespaceroot->push(IDPACKAGE(*pck), IDID(*pck));
    958       *h =namespaceroot->get(i, myynest); // search in toplevel namespace
    959       namespaceroot->pop();
     957      if((*pck!=NULL)&&(IDTYP(*pck)==PACKAGE_CMD))
     958      {
     959        namespaceroot->push(IDPACKAGE(*pck), IDID(*pck));
     960        *h =namespaceroot->get(i, myynest); // search in toplevel namespace
     961        namespaceroot->pop();
     962      }
    960963#else /* HAVE_NAMESPACES */
    961964#endif /* HAVE_NAMESPACES */
  • Singular/weight.cc

    r355f86 r4fc824e  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: weight.cc,v 1.19 2001-03-05 16:39:02 mschulze Exp $ */
     4/* $Id: weight.cc,v 1.20 2001-03-26 21:15:26 Singular Exp $ */
    55
    66/*
     
    245245  if(iv!=NULL)
    246246    len=iv->length();
    247   for(int i=pVariables;i>len;i--)
    248     s[i]= 1;
    249   for(;i>0;i--)
    250     s[i]= (*iv)[i-1];
     247  int i;
     248  for(i=pVariables;i>len;i--) s[i]=1;
     249  for(;i>0;i--)               s[i]=(*iv)[i-1];
    251250  return s;
    252251}
Note: See TracChangeset for help on using the changeset viewer.