Changeset 7a8011 in git


Ignore:
Timestamp:
Apr 21, 2011, 2:12:11 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
9b9ae7fadb61129e98f779cff3f5ea3435f370a7
Parents:
8167afd5e92aaed2ba8a54e3c1566fd86d339aa8
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-04-21 14:12:11+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:31:25+01:00
Message:
more CoeffWrite: rings, long R, long C
Location:
libpolys
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/gnumpc.cc

    r8167af r7a8011  
    411411  n->cfRePart  = ngcRePart;
    412412  n->cfImPart  = ngcImPart;
     413  n->cfCoeffWrite = ngcCoeffWrite;
    413414    // cfSize  = ndSize;
    414415#ifdef LDEBUG
     
    586587}
    587588
     589void    ngcCoeffWrite  (const coeffs r)
     590{
     591  Print("//   characteristic : 0 (complex:%d digits, additional %d digits)\n",
     592               r->float_len, r->float_len2);  /* long C */
     593}
  • libpolys/coeffs/gnumpc.h

    r8167af r7a8011  
    4444
    4545void     ngcDelete(number *a, const coeffs r);
     46void     ngcCoeffWrite(const coeffs r);
    4647
    4748#ifdef LDEBUG
  • libpolys/coeffs/gnumpfl.cc

    r8167af r7a8011  
    415415  n->cfPower   = ngfPower;
    416416  n->cfSetMap = ngfSetMap;
     417  n->cfCoeffWrite = ngfCoeffWrite;
    417418#ifdef LDEBUG
    418419  n->cfDBTest  = ndDBTest; // not yet implemented: ngfDBTest
     
    486487
    487488
     489void    ngfCoeffWrite  (const coeffs r)
     490{
     491  Print("//   characteristic : 0 (real:%d digits, additional %d digits)\n",
     492               r->float_len,r->float_len2);  /* long R */
     493}
  • libpolys/coeffs/gnumpfl.h

    r8167af r7a8011  
    3838number   ngf_Copy(number a, coeffs r);
    3939void     ngfWrite(number &a, const coeffs r);
     40void     ngfCoeffWrite(const coeffs r);
    4041
    4142void     ngfDelete(number *a, const coeffs r);
  • libpolys/coeffs/rintegers.cc

    r8167af r7a8011  
    372372  return s;
    373373}
     374
     375void    nrzCoeffWrite  (const coeffs r)
     376{
     377  PrintS("//   characteristic : 0 (Integers)\n");
     378}
     379
    374380
    375381BOOLEAN nrzInitChar(coeffs r,  void * parameter)
     
    386392  r->cfSize  = nrzSize;
    387393  r->cfInt  = nrzInt;
    388   #ifdef HAVE_RINGS
    389   //r->cfDivComp = nrzDivComp; // only for ring stuff
    390   //r->cfIsUnit = nrzIsUnit; // only for ring stuff
    391   //r->cfGetUnit = nrzGetUnit; // only for ring stuff
    392   //r->cfExtGcd = nrzExtGcd; // only for ring stuff
    393   //r->cfDivBy = nrzDivBy; // only for ring stuff
    394   #endif
     394  //#ifdef HAVE_RINGS
     395  r->cfDivComp = nrzDivComp; // only for ring stuff
     396  r->cfIsUnit = nrzIsUnit; // only for ring stuff
     397  r->cfGetUnit = nrzGetUnit; // only for ring stuff
     398  r->cfExtGcd = nrzExtGcd; // only for ring stuff
     399  r->cfDivBy = nrzDivBy; // only for ring stuff
     400  //#endif
    395401  r->cfNeg   = nrzNeg;
    396402  r->cfInvers= nrzInvers;
     
    409415  r->cfDelete= nrzDelete;
    410416  r->cfSetMap = nrzSetMap;
     417  r->cfCoeffWrite = nrzCoeffWrite;
    411418  // debug stuff
    412419
  • libpolys/coeffs/rintegers.h

    r8167af r7a8011  
    4646const char *  nrzRead  (const char *s, number *a, const coeffs r);
    4747char *  nrzName        (number n, const coeffs r);
     48void    nrzCoeffWrite  (const coeffs r);
    4849#ifdef LDEBUG
    4950BOOLEAN nrzDBTest      (number a, const char *f, const int l, const coeffs r);
  • libpolys/coeffs/rmodulo2m.cc

    r8167af r7a8011  
    2525
    2626extern omBin gmp_nrz_bin; /* init in rintegers*/
     27
     28void    nr2mCoeffWrite  (const coeffs r)
     29{
     30  Print("//   Z/2^%lu\n", r->modExponent);
     31}
    2732
    2833/* for initializing function pointers */
     
    6368  r->cfExtGcd      = nr2mExtGcd;
    6469  r->cfName        = ndName;
     70  r->cfCoeffWrite  = nr2mCoeffWrite;
    6571#ifdef LDEBUG
    6672  r->cfDBTest      = nr2mDBTest;
  • libpolys/coeffs/rmodulo2m.h

    r8167af r7a8011  
    4848const char *  nr2mRead  (const char *s, number *a, const coeffs r);
    4949char *  nr2mName        (number n, const coeffs r);
     50void    nr2mCoeffWrite  (const coeffs r);
    5051#ifdef LDEBUG
    5152BOOLEAN nr2mDBTest      (number a, const char *f, const int l, const coeffs r);
  • libpolys/coeffs/rmodulon.cc

    r8167af r7a8011  
    2525
    2626extern omBin gmp_nrz_bin;
     27
     28void    nrnCoeffWrite  (const coeffs r)
     29{
     30  long l = (long)mpz_sizeinbase(r->modBase, 10) + 2;
     31  char* s = (char*) omAlloc(l);
     32  if (nCoeff_is_Ring_ModN(r)) Print("//  Z/%s\n", s);
     33  else if (nCoeff_is_Ring_PtoM(r)) Print("//  Z/%s^%lu\n", s, r->modExponent);
     34  omFreeSize((ADDRESS)s, l);
     35}
    2736
    2837/* for initializing function pointers */
     
    6574  r->cfExtGcd      = nrnExtGcd;
    6675  r->cfName        = ndName;
     76  r->cfCoeffWrite  = nrnCoeffWrite;
    6777#ifdef LDEBUG
    6878  r->cfDBTest      = nrnDBTest;
  • libpolys/coeffs/rmodulon.h

    r8167af r7a8011  
    4747#define  nrnWrite      nrzWrite
    4848const char *  nrnRead  (const char *s, number *a, const coeffs r);
     49void     nrnCoeffWrite (const coeffs r);
    4950#ifdef LDEBUG
    5051BOOLEAN nrnDBTest      (number a, const char *f, const int l, const coeffs r);
  • libpolys/polys/monomials/ring.cc

    r8167af r7a8011  
    281281  n_CoeffWrite(r->cf);
    282282#if 0
    283   if (rField_is_GF(r))
    284   {
    285     Print("//   # ground field : %d\n",r->cf->ch);
    286     Print("//   primitive element : %s\n", r->parameter[0]);
    287     StringSetS("//   minpoly        : ");
    288     nfShowMipo(r->cf);PrintS(StringAppendS("\n"));
    289   }
    290 #ifdef HAVE_RINGS
    291   else if (rField_is_Ring(r))
    292   {
    293     PrintS("//   coeff. ring is : ");
    294     if (rField_is_Ring_Z(r)) PrintS("Integers\n");
    295     long l = (long)mpz_sizeinbase(r->cf->modBase, 10) + 2;
    296     char* s = (char*) omAlloc(l);
    297     mpz_get_str(s,10,r->cf->modBase);
    298     if (rField_is_Ring_ModN(r)) Print("Z/%s\n", s);
    299     if (rField_is_Ring_2toM(r)) Print("Z/2^%lu\n", r->cf->modExponent);
    300     if (rField_is_Ring_PtoM(r)) Print("Z/%s^%lu\n", s, r->cf->modExponent);
    301     omFreeSize((ADDRESS)s, l);
    302   }
    303 #endif
    304283  else
    305284  {
Note: See TracChangeset for help on using the changeset viewer.