Changeset 03f7b5 in git for libpolys


Ignore:
Timestamp:
Oct 11, 2011, 7:22:48 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
3c56d88ff43b9f485d15dbe25b01664e8e072f04
Parents:
5f4015a4722191e67435fb8503aa693c23375458
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-10-11 19:22:48+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:13:59+01:00
Message:
ADD: detailed printing vs typing for coeff. domains (mostly - minpoly related)
Location:
libpolys
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/coeffs.h

    r5f4015a r03f7b5  
    100100
    101101   /// output of coeff description via Print
    102    void (*cfCoeffWrite)(const coeffs r);
     102   void (*cfCoeffWrite)(const coeffs r, BOOLEAN details);
    103103
    104104   // the union stuff
     
    541541
    542542/// output the coeff description
    543 static inline void   n_CoeffWrite(const coeffs r)
    544 { assume(r != NULL); assume(r->cfCoeffWrite != NULL); r->cfCoeffWrite(r); }
     543static inline void   n_CoeffWrite(const coeffs r, BOOLEAN details = TRUE)
     544{ assume(r != NULL); assume(r->cfCoeffWrite != NULL); r->cfCoeffWrite(r, details); }
    545545
    546546// Tests:
  • libpolys/coeffs/ffields.cc

    r5f4015a r03f7b5  
    868868}
    869869
    870 void    nfCoeffWrite  (const coeffs r)
     870void    nfCoeffWrite  (const coeffs r, BOOLEAN details)
    871871{
    872872  // m_nfCharQ = p^k where p is the characteristic (r->CharP) and k is GFDegree
    873873  Print("//   # ground field : %d\n",r->m_nfCharQ);
    874874  Print("//   primitive element : %s\n", r->m_nfParameter);
    875   StringSetS("//   minpoly        : ");
    876   nfShowMipo(r);PrintS(StringAppendS("\n"));
     875  if ( details )
     876  {
     877    StringSetS("//   minpoly        : ");
     878    nfShowMipo(r);
     879    PrintS(StringAppendS("\n"));
     880  }
     881  else PrintS("//   minpoly        : ...\n");
    877882}
    878883
  • libpolys/coeffs/ffields.h

    r5f4015a r03f7b5  
    4242void    nfReadTable   (const int c, const coeffs r);
    4343
    44 void    nfCoeffWrite(const coeffs r);
     44void    nfCoeffWrite(const coeffs r, BOOLEAN details);
    4545void    nfShowMipo(const coeffs r);
    4646#endif
  • libpolys/coeffs/gnumpc.cc

    r5f4015a r03f7b5  
    610610}
    611611
    612 void    ngcCoeffWrite  (const coeffs r)
     612void    ngcCoeffWrite  (const coeffs r, BOOLEAN details)
    613613{
    614614  Print("//   characteristic : 0 (complex:%d digits, additional %d digits)\n",
    615                r->float_len, r->float_len2);  /* long C */
    616 }
     615        r->float_len, r->float_len2);  /* long C */
     616  Print("//   1 parameter    : %s\n", r->complex_parameter);
     617  Print("//   minpoly        : (%s^2+1)\n", r->complex_parameter); 
     618}
  • libpolys/coeffs/gnumpc.h

    r5f4015a r03f7b5  
    4545
    4646void     ngcDelete(number *a, const coeffs r);
    47 void     ngcCoeffWrite(const coeffs r);
     47void     ngcCoeffWrite(const coeffs r, BOOLEAN details);
    4848
    4949#ifdef LDEBUG
  • libpolys/coeffs/gnumpfl.cc

    r5f4015a r03f7b5  
    521521
    522522
    523 void    ngfCoeffWrite  (const coeffs r)
     523void    ngfCoeffWrite  (const coeffs r, BOOLEAN /*details*/)
    524524{
    525525  Print("//   characteristic : 0 (real:%d digits, additional %d digits)\n",
  • libpolys/coeffs/gnumpfl.h

    r5f4015a r03f7b5  
    3838number   ngf_Copy(number a, coeffs r);
    3939void     ngfWrite(number &a, const coeffs r);
    40 void     ngfCoeffWrite(const coeffs r);
     40void     ngfCoeffWrite(const coeffs r, BOOLEAN details);
    4141
    4242void     ngfDelete(number *a, const coeffs r);
  • libpolys/coeffs/longrat.cc

    r5f4015a r03f7b5  
    25592559}
    25602560
    2561 void    nlCoeffWrite  (const coeffs)
     2561void    nlCoeffWrite  (const coeffs, BOOLEAN /*details*/)
    25622562{
    25632563  PrintS("//   characteristic : 0\n");
  • libpolys/coeffs/longrat.h

    r5f4015a r03f7b5  
    9191number   nlGetDenom(number &n, const coeffs r);
    9292number   nlGetNumerator(number &n, const coeffs r);
    93 void     nlCoeffWrite(const coeffs r);
     93void     nlCoeffWrite(const coeffs r, BOOLEAN details);
    9494number   nlChineseRemainder(number *x, number *q,int rl, const coeffs C);
    9595number   nlFarey(number nN, number nP, const coeffs CF);
  • libpolys/coeffs/modulop.cc

    r5f4015a r03f7b5  
    813813#endif
    814814
    815 void    npCoeffWrite  (const coeffs r)
     815void    npCoeffWrite  (const coeffs r, BOOLEAN /*details*/)
    816816{
    817817  Print("//   characteristic : %d\n",r->npPrimeM);
  • libpolys/coeffs/modulop.h

    r5f4015a r03f7b5  
    4242BOOLEAN npEqual       (number a, number b,const coeffs r);
    4343void    npWrite       (number &a, const coeffs r);
    44 void    npCoeffWrite  (const coeffs r);
     44void    npCoeffWrite  (const coeffs r, BOOLEAN details);
    4545const char *  npRead  (const char *s, number *a,const coeffs r);
    4646#ifdef LDEBUG
  • libpolys/coeffs/rintegers.cc

    r5f4015a r03f7b5  
    377377}
    378378
    379 void    nrzCoeffWrite  (const coeffs)
     379void    nrzCoeffWrite  (const coeffs, BOOLEAN /*details*/)
    380380{
    381381  PrintS("//   characteristic : 0 (Integers)\n");
  • libpolys/coeffs/rintegers.h

    r5f4015a r03f7b5  
    4646const char *  nrzRead  (const char *s, number *a, const coeffs r);
    4747char *  nrzName        (number n, const coeffs r);
    48 void    nrzCoeffWrite  (const coeffs r);
     48void    nrzCoeffWrite  (const coeffs r, BOOLEAN details);
    4949#ifdef LDEBUG
    5050BOOLEAN nrzDBTest      (number a, const char *f, const int l, const coeffs r);
  • libpolys/coeffs/rmodulo2m.cc

    r5f4015a r03f7b5  
    2929extern omBin gmp_nrz_bin; /* init in rintegers*/
    3030
    31 void    nr2mCoeffWrite  (const coeffs r)
     31void    nr2mCoeffWrite  (const coeffs r, BOOLEAN /*details*/)
    3232{
    3333  Print("//   Z/2^%lu\n", r->modExponent);
  • libpolys/coeffs/rmodulo2m.h

    r5f4015a r03f7b5  
    4848const char *  nr2mRead  (const char *s, number *a, const coeffs r);
    4949char *  nr2mName        (number n, const coeffs r);
    50 void    nr2mCoeffWrite  (const coeffs r);
     50void    nr2mCoeffWrite  (const coeffs r, BOOLEAN details);
    5151#ifdef LDEBUG
    5252BOOLEAN nr2mDBTest      (number a, const char *f, const int l, const coeffs r);
  • libpolys/coeffs/rmodulon.cc

    r5f4015a r03f7b5  
    2929extern omBin gmp_nrz_bin;
    3030
    31 void    nrnCoeffWrite  (const coeffs r)
     31void    nrnCoeffWrite  (const coeffs r, BOOLEAN /*details*/)
    3232{
    3333  long l = (long)mpz_sizeinbase(r->modBase, 10) + 2;
  • libpolys/coeffs/rmodulon.h

    r5f4015a r03f7b5  
    4747#define  nrnWrite      nrzWrite
    4848const char *  nrnRead  (const char *s, number *a, const coeffs r);
    49 void     nrnCoeffWrite (const coeffs r);
     49void     nrnCoeffWrite (const coeffs r, BOOLEAN details);
    5050#ifdef LDEBUG
    5151BOOLEAN nrnDBTest      (number a, const char *f, const int l, const coeffs r);
  • libpolys/coeffs/shortfl.cc

    r5f4015a r03f7b5  
    4747
    4848
    49 void    nrCoeffWrite  (const coeffs r)
     49void    nrCoeffWrite  (const coeffs r, BOOLEAN /*details*/)
    5050{
    5151  assume( getCoeffType(r) == ID );
  • libpolys/polys/ext_fields/algext.cc

    r5f4015a r03f7b5  
    7070#define naMinpoly naRing->minideal->m[0]
    7171
    72 
    7372/// forward declarations
    7473BOOLEAN  naGreaterZero(number a, const coeffs cf);
     
    9796int      naSize(number a, const coeffs cf);
    9897void     naDelete(number *a, const coeffs cf);
    99 void     naCoeffWrite(const coeffs cf);
     98void     naCoeffWrite(const coeffs cf, BOOLEAN details);
    10099number   naIntDiv(number a, number b, const coeffs cf);
    101100const char * naRead(const char *s, number *a, const coeffs cf);
     101
    102102static BOOLEAN naCoeffIsEqual(const coeffs cf, n_coeffType n, void * param);
    103103
     
    256256}
    257257
    258 void naCoeffWrite(const coeffs cf)
     258void naCoeffWrite(const coeffs cf, BOOLEAN details)
    259259{
    260260  assume( cf != NULL );
     
    265265  assume( A->cf != NULL );
    266266   
    267   n_CoeffWrite(A->cf);
     267  n_CoeffWrite(A->cf, details);
    268268 
    269269//  rWrite(A);
     
    277277    Print("%s ", rRingVar(nop, A));
    278278 
     279  PrintLn();
     280 
    279281  const ideal I = A->minideal;
    280282
     
    282284  assume( IDELEMS(I) == 1 );
    283285 
    284   PrintS("\n//   minpoly        : ("); p_Write0( I->m[0], A); PrintS(")\n");
     286
     287  if ( details )
     288  {
     289    PrintS("//   minpoly        : (");
     290    p_Write0( I->m[0], A);
     291    PrintS(")");
     292  }
     293  else
     294    PrintS("//   minpoly        : ...");
     295 
     296  PrintLn();
    285297 
    286298/*
  • libpolys/polys/ext_fields/transext.cc

    r5f4015a r03f7b5  
    118118int      ntSize(number a, const coeffs cf);
    119119void     ntDelete(number * a, const coeffs cf);
    120 void     ntCoeffWrite(const coeffs cf);
     120void     ntCoeffWrite(const coeffs cf, BOOLEAN details);
    121121number   ntIntDiv(number a, number b, const coeffs cf);
    122122const char * ntRead(const char *s, number *a, const coeffs cf);
     
    377377}
    378378
    379 void ntCoeffWrite(const coeffs cf)
     379void ntCoeffWrite(const coeffs cf, BOOLEAN details)
    380380{
    381381  assume( cf != NULL );
     
    386386  assume( A->cf != NULL );
    387387
    388   n_CoeffWrite(A->cf);
     388  n_CoeffWrite(A->cf, details);
    389389
    390390//  rWrite(A);
     
    401401
    402402  PrintS("\n//   minpoly        : 0\n");
    403 
    404403
    405404/*
  • libpolys/polys/ext_fields/transext.h

    r5f4015a r03f7b5  
    125125int      ntSize(number a, const coeffs cf);
    126126void     ntDelete(number * a, const coeffs cf);
    127 void     ntCoeffWrite(const coeffs cf);
     127void     ntCoeffWrite(const coeffs cf, BOOLEAN details);
    128128number   ntIntDiv(number a, number b, const coeffs cf);
    129129const char * ntRead(const char *s, number *a, const coeffs cf);
  • libpolys/polys/monomials/ring.cc

    r5f4015a r03f7b5  
    245245  nblocks--;
    246246
    247   n_CoeffWrite(r->cf);
     247  n_CoeffWrite(r->cf, details);
    248248#if 0
    249249  {
Note: See TracChangeset for help on using the changeset viewer.