Changeset 4c6e420 in git for libpolys/coeffs/gnumpc.cc


Ignore:
Timestamp:
Apr 27, 2011, 4:25:41 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '4188d308699580d975efd0f6cca8dcb41c396f70')
Children:
760a78f4333abdcf36c17059f611fa15a34c2dac
Parents:
5c97e10bb44ba586b18c55984cb4187d64f2d618
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-04-27 16:25:41+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:31:30+01:00
Message:
ADD: algring to coeffs (for extension fields via polynomials)
FIX: eliminated the use of minpoly/P/params in polynomials (as much as was possible)
ADD: complex numbers need a name for the imaginary root of -1 (use complex_parameter instead of parameter[0])
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/gnumpc.cc

    r5c97e10 r4c6e420  
    327327{
    328328  assume( getCoeffType(r) == ID );
    329  
     329  assume( r->compex_parameter != NULL );
    330330  if ((*s >= '0') && (*s <= '9'))
    331331  {
     
    336336    delete re;
    337337  }
    338   else if (strncmp(s, r->parameter[0],strlen(r->parameter[0]))==0)
    339   {
    340     s+=strlen(r->parameter[0]);
     338  else if (strncmp(s, r->compex_parameter,strlen(r->compex_parameter))==0)
     339  {
     340    s+=strlen(r->compex_parameter);
    341341    gmp_complex *aa=new gmp_complex((long)0,(long)1);
    342342    *a=(number)aa;
     
    382382}
    383383
    384 BOOLEAN ngcInitChar(coeffs n, void*)
     384BOOLEAN ngcInitChar(coeffs n, void* p)
    385385{
    386386  assume( getCoeffType(n) == ID );
     
    486486
    487487/// TODO: Any variables?
     488  if( p == NULL )
     489    n->compex_parameter = "i"; //??
     490  else
     491    n->compex_parameter = omStrDup( (char*) p );
     492   
    488493  return FALSE;
    489494}
Note: See TracChangeset for help on using the changeset viewer.