Changeset df34cff in git for libpolys


Ignore:
Timestamp:
Sep 30, 2011, 11:51:10 AM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
fb85f97c3bddafa4d2cc27026716efd98a786f07
Parents:
77f594c6fdd00c4d2463427b85228898264f03af
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-09-30 11:51:10+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:13:50+01:00
Message:
ADD: rWrite can print additional details if asked
Location:
libpolys/polys/monomials
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/monomials/ring.cc

    r77f594 rdf34cff  
    229229
    230230
    231 void rWrite(ring r)
     231void   rWrite(ring r, BOOLEAN details)
    232232{
    233233  if ((r==NULL)||(r->order==NULL))
     
    355355  {
    356356    PrintS("\n//   noncommutative relations:");
    357     poly pl=NULL;
    358     int nl;
    359     int i,j;
    360     for (i = 1; i<r->N; i++)
    361     {
    362       for (j = i+1; j<=r->N; j++)
    363       {
    364         nl = n_IsOne(p_GetCoeff(MATELEM(r->GetNC()->C,i,j),r), r->cf);
    365         if ( (MATELEM(r->GetNC()->D,i,j)!=NULL) || (!nl) )
    366         {
    367           Print("\n//    %s%s=",r->names[j-1],r->names[i-1]);
    368           pl = MATELEM(r->GetNC()->MT[UPMATELEM(i,j,r->N)],1,1);
    369           p_Write0(pl, r, r);
     357    if( details )
     358    {
     359      poly pl=NULL;
     360      int nl;
     361      int i,j;
     362      for (i = 1; i<r->N; i++)
     363      {
     364        for (j = i+1; j<=r->N; j++)
     365        {
     366          nl = n_IsOne(p_GetCoeff(MATELEM(r->GetNC()->C,i,j),r), r->cf);
     367          if ( (MATELEM(r->GetNC()->D,i,j)!=NULL) || (!nl) )
     368          {
     369            Print("\n//    %s%s=",r->names[j-1],r->names[i-1]);
     370            pl = MATELEM(r->GetNC()->MT[UPMATELEM(i,j,r->N)],1,1);
     371            p_Write0(pl, r, r);
     372          }
    370373        }
    371374      }
    372     }
     375    } else
     376      PrintS(" ...");
     377     
    373378#if 0  /*Singularg should not differ from Singular except in error case*/
    374379    Print("\n//   noncommutative type:%d", (int)ncRingType(r));
  • libpolys/polys/monomials/ring.h

    r77f594 rdf34cff  
    341341// #define rIsRingVar(A) r_IsRingVar(A,currRing)
    342342int    r_IsRingVar(const char *n, ring r);
    343 void   rWrite(ring r);
     343void   rWrite(ring r, BOOLEAN details = FALSE);
    344344// void   rKill(idhdl h);
    345345// void   rKill(ring r);
Note: See TracChangeset for help on using the changeset viewer.