Changeset 52b370b in git for Singular


Ignore:
Timestamp:
Nov 13, 1997, 10:09:28 AM (27 years ago)
Author:
Thomas Siebert <siebert@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
57eacd52438439e0ee05601a56132738dd1d14a1
Parents:
2012e62a5af6086d406b892ed90b543f56d4fae0
Message:
*** empty log message ***


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

Legend:

Unmodified
Added
Removed
  • Singular/extra.cc

    r2012e6 r52b370b  
    22*  Computer Algebra System SINGULAR      *
    33*****************************************/
    4 /* $Id: extra.cc,v 1.21 1997-10-18 11:04:13 Singular Exp $ */
     4/* $Id: extra.cc,v 1.22 1997-11-13 09:09:26 siebert Exp $ */
    55/*
    66* ABSTRACT: general interface to internals of Singular ("system" command)
     
    344344    if(strcmp((char*)(h->Data()),"red")==0)
    345345    {
    346       if ((h->next!=NULL) &&(h->next->Typ()==IDEAL_CMD))
     346     if ((h->next!=NULL) &&(h->next->Typ()==IDEAL_CMD))
    347347      {
    348348        res->rtyp=IDEAL_CMD;
     
    608608    else
    609609#endif
     610/*==================== barstep =============================*/
     611    if(strcmp((char*)(h->Data()),"barstep")==0)
     612    {
     613     if ((h->next!=NULL) &&(h->next->Typ()==MATRIX_CMD))
     614      {
     615        if (h->next->next!=NULL)
     616        {
     617          if (h->next->next->Typ()!=POLY_CMD)
     618          {
     619              Warn("Wrong types for barstep(matrix,poly)");
     620          }
     621        }
     622        int r,c;
     623        poly div=(poly)h->next->next->Data();
     624        res->rtyp=MATRIX_CMD;
     625        res->data=(void *)mpOneStepBareiss((matrix)h->next->Data(),
     626                   &div,&r,&c);
     627        Print("div: ");pWrite(div);
     628        Print("rows: %d, cols: %d\n",r,c);
     629        pDelete(&div);
     630        return FALSE;
     631      }
     632      else
     633        WerrorS("matrix expected");
     634    }
    610635/*============================================================*/
    611636      WerrorS("not implemented\n");
  • Singular/matpol.cc

    r2012e6 r52b370b  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: matpol.cc,v 1.3 1997-04-02 15:07:25 Singular Exp $ */
     4/* $Id: matpol.cc,v 1.4 1997-11-13 09:09:27 siebert Exp $ */
    55
    66/*
     
    319319  mp_permmatrix(mp_permmatrix *);
    320320  ~mp_permmatrix();
     321  int mpGetRow();
     322  int mpGetCol();
    321323  int mpGetRdim();
    322324  int mpGetCdim();
     
    370372  delete v;
    371373  return c;
     374}
     375
     376/*2
     377*  one step of 'Bareiss' algorithm
     378*  for application in minor
     379*  assume to have a full matrix
     380*  if *H!=0, then divide by *H (the pivot from the step before)
     381*  returns the choosen pivot *H=m[*r,*c]
     382*  the result has the pivot at the right lower corner
     383*/
     384matrix mpOneStepBareiss (matrix a, poly *H, int *r, int *c)
     385{
     386  poly div=*H;
     387  matrix re = mpCopy(a);
     388  mp_permmatrix *Bareiss = new mp_permmatrix(re);
     389  row_col_weight w(Bareiss->mpGetRdim(), Bareiss->mpGetCdim());
     390
     391  /* step of Bareiss */
     392  if(Bareiss->mpPivotBareiss(&w))
     393  {
     394    Bareiss->mpElimBareiss(div);
     395    div = Bareiss->mpGetElem(Bareiss->mpGetRdim(), Bareiss->mpGetCdim());
     396    *H = pCopy(div);
     397    *c = Bareiss->mpGetCol()+1;
     398    *r = Bareiss->mpGetRow()+1;
     399    Bareiss->mpRowReorder();
     400    Bareiss->mpColReorder();
     401  }
     402  else
     403  {
     404    *H = NULL;
     405    *c = *r = 0;
     406  }
     407  Bareiss->mpSaveArray();
     408  delete Bareiss;
     409  return re;
    372410}
    373411
     
    12081246}
    12091247
     1248int mp_permmatrix::mpGetRow()
     1249{
     1250  return qrow[s_m];
     1251}
     1252
     1253int mp_permmatrix::mpGetCol()
     1254{
     1255  return qcol[s_n];
     1256}
     1257
    12101258/*2
    12111259* exact division a/b, used in Bareiss algorithm
  • Singular/matpol.h

    r2012e6 r52b370b  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: matpol.h,v 1.4 1997-04-09 12:19:58 Singular Exp $ */
     6/* $Id: matpol.h,v 1.5 1997-11-13 09:09:28 siebert Exp $ */
    77/*
    88* ABSTRACT
     
    4747
    4848matrix mpBareiss (matrix a, BOOLEAN diagonal);
     49matrix mpOneStepBareiss (matrix a, poly *H, int *r, int *c);
    4950poly mpDet (matrix m);
    5051matrix mpWedge(matrix a, int ar);
Note: See TracChangeset for help on using the changeset viewer.