Changeset e9039a7 in git for libpolys/coeffs/ffields.cc


Ignore:
Timestamp:
Sep 27, 2011, 12:41:03 PM (13 years ago)
Author:
Burcin Erocal <burcin@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
31c731745883c6d2ee7aba0e448c9320087d095a
Parents:
37e36e946ee174d951bb2e0fbae1283480ace5f6
git-author:
Burcin Erocal <burcin@erocal.org>2011-09-27 12:41:03+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:13:36+01:00
Message:
Print number of elements of GF's instead of characteristic.

Implement nCoeffIsEqual for n_GF coefficient domains.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/ffields.cc

    r37e36e re9039a7  
    763763  //r->cfKillChar=nfKillChar;
    764764  r->cfSetChar= NULL;
    765   //r->nCoeffIsEqual=nfCoeffsEqual;
     765  r->nCoeffIsEqual=nfCoeffIsEqual;
    766766
    767767  r->cfMult  = nfMult;
     
    864864void    nfCoeffWrite  (const coeffs r)
    865865{
    866   Print("//   # ground field : %d\n",r->m_nfCharP);
     866  // m_nfCharQ = p^k where p is the characteristic (r->CharP) and k is GFDegree
     867  Print("//   # ground field : %d\n",r->m_nfCharQ);
    867868  Print("//   primitive element : %s\n", r->m_nfParameter);
    868869  StringSetS("//   minpoly        : ");
     
    870871}
    871872
     873BOOLEAN nfCoeffIsEqual (const coeffs r, n_coeffType n, void * parameter)
     874{
     875
     876  if (n==n_GF) {
     877    GFInfo* p = (GFInfo *)(parameter);
     878    int c = pow (p->GFChar, p->GFDegree);
     879    if (c == r->m_nfCharQ)
     880      return TRUE;
     881  }
     882  return FALSE;
     883}
Note: See TracChangeset for help on using the changeset viewer.