Changeset eeb5b0c in git


Ignore:
Timestamp:
Feb 25, 2014, 11:52:34 AM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
be7a5d1166e45033b6b760b23ded5cc68cb2fe00ecc5d0a0657b1bdbcf12fcb168322a3365720243
Parents:
7b00dbc9f0db50c18cea3edd1cbb42325128fa85ca4d699a62eed4a4238bdfb1699eaaf9f7334a42
Message:
Merge pull request #491 from surface-smoothers/test.for.bug540

added test for bug 540
Files:
13 added
2 deleted
112 edited
6 moved

Legend:

Unmodified
Added
Removed
  • .gitignore

    rca4d699 reeb5b0c  
     1_config.h
     2_config.h.in
     3.deps
     4.dirstamp
     5.DS_Store
     6.libs
     7*.[oa]
    18*.d
    29*.dd
    3 *.[oa]
     10*.exe
     11*.gcda
     12*.gcno
     13*.la
     14*.lo
    415*.o_ndebug
    516*.og
    6 *.exe
     17*.pc
    718*.swp
    8 *.lo
    9 *.la
    10 *.gcno
    11 *.gcda
    12 *.pc
     19*.trs
    1320*~
    14 .libs
     21/.tarball-git-version
    1522/AUTOGEN_generated_stuff
    16 MOD
     23/desktop/Singular-manual.desktop
     24/desktop/Singular.desktop
     25/doc/NTL
     26/doc/uname.texi
     27/doc/version.texi
     28/dyn_modules/modgen/modgen
     29/dyn_modules/modgen/pathnames.h
     30/factory/factory.h
     31/factory/factoryconf.h
     32/factory/ftest/GNUmakefile
     33/factory/gengftables
     34/factory/GNUmakefile
     35/factory/readcf.cc
     36/factory/test
     37/factory/ylwrap
     38/IntegerProgramming/change_cost
     39/IntegerProgramming/gen_test
     40/IntegerProgramming/LLL
     41/IntegerProgramming/solve_IP
     42/IntegerProgramming/toric_ideal
     43/ix86-Linux/*
     44/ix86-Win/*
     45/ix86Mac-darwin/*
     46/kernel/test
     47/libpolys/coeffs/test
     48/libpolys/libpolys-config
     49/libpolys/libpolysconfig.h
     50/libpolys/libpolysconfig.h.in
     51/libpolys/misc/auxiliary.h
     52/libpolys/polys/m4/
     53/libpolys/polys/templates/p_Procs_Generate
     54/libpolys/polys/templates/p_Procs.inc
     55/libpolys/tests/gftables
     56/libpolys/tests/p_Procs_*.so
    1757/libsingular-config
    18 /factory/readcf.cc
    19 /factory/ylwrap
    20 /factory/gengftables
    2158/m4/libtool.m4
     59/m4/lt~obsolete.m4
    2260/m4/ltoptions.m4
    2361/m4/ltsugar.m4
    2462/m4/ltversion.m4
    25 /m4/lt~obsolete.m4
    26 /Singular/Singular
     63/modules/include/config.h
     64/MP/*
     65/ntl/*
     66/omalloc/Makefile.in
     67/omalloc/omalloc.h
     68/omalloc/omConfig.h
     69/omalloc/omConfig.h.in
     70/omalloc/omExternalConfig.h
     71/omalloc/omlimits.h
     72/omalloc/omTables
     73/omalloc/omTables.dSYM/*
     74/omalloc/omTables.h
     75/omalloc/omTables.inc
     76/redhat/singular.spec
     77/resources/resourcesconfig.h
     78/resources/resourcesconfig.h.in
     79/Singular/all.lib
     80/Singular/ESingular
     81/Singular/feOptGen
     82/Singular/gftables
    2783/Singular/mpsr_Tok.xx
    2884/Singular/ndbm.dl_og
    2985/Singular/sing_dbm.dl_og
    30 /Singular/svnver
    31 /dyn_modules/modgen/modgen
    32 /dyn_modules/modgen/pathnames.h
     86/Singular/Singular
     87/Singular/Singular.rc
     88/Singular/TSingular
     89/x86_64-Linux/*
     90aclocal.m4
    3391ar-lib
     92autom4te.cache/
     93compile
     94confdefs.h
     95config.cache
     96config.guess
    3497config.h
     98config.h.in*
     99config.log
     100config.status
     101config.sub
    35102configure
    36 config.h.in*
    37 config.sub
    38 config.log
    39 config.guess
    40 config.status
    41 /ntl/*
    42 .dirstamp
    43 /libpolys/misc/auxiliary.h
    44 /libpolys/polys/templates/p_Procs_Generate
    45 /libpolys/polys/templates/p_Procs.inc
    46 /libpolys/polys/m4/
    47 /libpolys/libpolys-config
     103COPYING
     104depcomp
    48105depend
    49 tags
     106GNUMakefile
     107INSTALL
     108install-sh
     109libtool
    50110ltmain.sh
    51 libtool
    52 INSTALL
    53 COPYING
    54111Makefile
    55112Makefile.in
    56 install-sh
    57 !configure.ac
    58 GNUMakefile
    59 confdefs.h
    60 tags
    61 stamp-h
    62 /ix86-Linux/*
    63 /ix86-Win/*
    64 /x86_64-Linux/*
    65 /ix86Mac-darwin/*
    66 /omalloc/stamp-h3
    67 /omalloc/Makefile.in
    68 /omalloc/omTables
    69 /omalloc/omTables.h
    70 /omalloc/omTables.inc
    71 /omalloc/omalloc.h
    72 /omalloc/omTables.dSYM/*
    73 /MP/*
    74 /Singular/confdefs.h
    75 /Singular/Singular.rc
    76 config.cache
    77 /doc/uname.texi
    78 /doc/version.texi
    79 /factory/GNUmakefile
    80 config.h
    81 /factory/ftest/GNUmakefile
    82 /modules/include/config.h
    83 /ntl/*
    84 /omalloc/omConfig.h
    85 /omalloc/omExternalConfig.h
    86 /omalloc/omlimits.h
    87 /omalloc/omConfig.h.in
    88 /doc/NTL
    89 /factory/factory.h
    90 /factory/factoryconf.h
    91 /libpolys/tests/gftables
    92 /libpolys/tests/p_Procs_*.so
    93 aclocal.m4
    94 autom4te.cache/
    95 .deps
    96 ylwrap
    97 compile
    98 depcomp
    99113missing
    100 stamp-h1
    101 stamp-h2
    102 test-driver
     114MOD
    103115singular.png
    104 *.trs
    105 /.tarball-git-version
    106 .DS_Store
    107116singularconfig.h
    108117singularconfig.h.in
    109 /libpolys/libpolysconfig.h.in
    110 /libpolys/libpolysconfig.h
    111 /resources/resourcesconfig.h
    112 /resources/resourcesconfig.h.in
    113 /IntegerProgramming/LLL
    114 /IntegerProgramming/change_cost
    115 /IntegerProgramming/gen_test
    116 /IntegerProgramming/solve_IP
    117 /IntegerProgramming/toric_ideal
    118 /Singular/ESingular
    119 /Singular/Singular
    120 /Singular/TSingular
    121 /Singular/all.lib
    122 /Singular/feOptGen
    123 /Singular/gftables
    124 /Singular/test
    125 /desktop/Singular-manual.desktop
    126 /desktop/Singular.desktop
    127 /factory/test
    128 /kernel/test
    129 /libpolys/coeffs/test
    130 /redhat/singular.spec
     118stamp-h*
     119tags
     120test-driver
  • IntegerProgramming/binomial.cc

    rca4d699 reeb5b0c  
    147147
    148148    if(i<size_of_support_vectors)
     149    {
    149150      // variable i is considered in the support vectors
    150151      if(actual_entry>0)
    151152        head_support|=(1<<i);
    152153        // bit i of head_support is set to 1 (counting from 0)
    153       else
    154         if(actual_entry<0)
    155           tail_support|=(1<<i);
    156     // bit i of tail_support is set to 1
     154      else if(actual_entry<0)
     155        tail_support|=(1<<i);
     156        // bit i of tail_support is set to 1
     157    }
    157158  }
    158159
     
    209210
    210211    if(i<size_of_support_vectors)
     212    {
    211213      // variable i is considered in the support vectors
    212214      if(actual_entry>0)
    213215        head_support|=(1<<i);
    214216        // bit i of head_support is set to 1 (counting from 0)
    215       else
    216         if(actual_entry<0)
    217           tail_support|=(1<<i);
    218     // bit i of tail_support is set to 1
     217      else if(actual_entry<0)
     218        tail_support|=(1<<i);
     219        // bit i of tail_support is set to 1
     220    }
    219221  }
    220222
     
    881883
    882884    if(i<size_of_support_vectors)
     885    {
    883886      if(actual_entry>0)
    884887        head_support|=(1<<i);
    885       else
    886         if(actual_entry<0)
    887           tail_support|=(1<<i);
     888      else if(actual_entry<0)
     889        tail_support|=(1<<i);
     890    }
    888891  }
    889892
     
    932935
    933936    if(i<size_of_support_vectors)
     937    {
    934938      if(actual_entry>0)
    935939        head_support|=(1<<i);
    936       else
    937         if(actual_entry<0)
    938           tail_support|=(1<<i);
     940      else if(actual_entry<0)
     941        tail_support|=(1<<i);
     942    }
    939943  }
    940944
     
    950954
    951955    if(i<size_of_support_vectors)
     956    {
    952957      if(actual_entry>0)
    953958        head_support|=(1<<i);
    954       else
    955         if(actual_entry<0)
    956           tail_support|=(1<<i);
     959      else if(actual_entry<0)
     960        tail_support|=(1<<i);
     961    }
    957962  }
    958963
     
    10271032
    10281033    if(i<size_of_support_vectors)
     1034    {
    10291035      if(actual_entry>0)
    10301036        result.head_support|=(1<<i);
    1031       else
    1032         if(actual_entry<0)
    1033           result.tail_support|=(1<<i);
     1037      else if(actual_entry<0)
     1038        result.tail_support|=(1<<i);
     1039    }
    10341040  }
    10351041
     
    10481054
    10491055    if(i<size_of_support_vectors)
     1056    {
    10501057      if(actual_entry>0)
    10511058        result.head_support|=(1<<i);
    1052       else
    1053         if(actual_entry<0)
     1059      else if(actual_entry<0)
    10541060          result.tail_support|=(1<<i);
     1061    }
    10551062  }
    10561063
     
    14111418    if(actual_entry>0)
    14121419      head_support|=(1<<i);
    1413     else
    1414       if(actual_entry[i]<0)
    1415         tail_support|=(1<<i);
     1420    else if(actual_entry[i]<0)
     1421      tail_support|=(1<<i);
    14161422  }
    14171423
     
    14261432    if(actual_entry>0)
    14271433      head_support|=(1<<i);
    1428     else
    1429       if(actual_entry<0)
    1430         tail_support|=(1<<i);
     1434    else if(actual_entry<0)
     1435      tail_support|=(1<<i);
    14311436  }
    14321437
     
    14981503    if(actual_entry>0)
    14991504      head_support|=(1<<i);
    1500     else
    1501       if(actual_entry<0)
    1502         tail_support|=(1<<i);
     1505    else if(actual_entry<0)
     1506      tail_support|=(1<<i);
    15031507  }
    15041508
     
    15131517    if(actual_entry>0)
    15141518      head_support|=(1<<i);
    1515     else
    1516       if(actual_entry<0)
    1517         tail_support|=(1<<i);
     1519    else if(actual_entry<0)
     1520      tail_support|=(1<<i);
    15181521  }
    15191522
  • IntegerProgramming/matrix.cc

    rca4d699 reeb5b0c  
    351351  for(int i=0;i<_kernel_dimension;i++)
    352352    if(M[i]>BigInt(0))
     353    {
    353354      if(min_index==-1)
    354355        min_index=i;
    355       else
    356         if(M[i]<M[min_index])
    357           min_index=i;
     356      else if(M[i]<M[min_index])
     357        min_index=i;
     358    }
    358359
    359360  // Now, H[min_index] is the vector to be transformed into a nonnegative one.
     
    445446    for(int i=current_position;i<_kernel_dimension;i++)
    446447      if(M[i]>BigInt(0))
     448      {
    447449        if(min_index==0)
    448450          min_index=i;
    449         else
    450           if(M[i]<M[min_index])
    451             min_index=i;
     451        else if(M[i]<M[min_index])
     452          min_index=i;
     453      }
    452454
    453455    // Now, a multiple of H[min_index] will be added to the already constructed
     
    639641      for(int j=0;j<columns;j++)
    640642        if(ideal_saturated_by_var[j]==FALSE)
     643        {
    641644          if(H[k][j]> BigInt(0))
    642645            // ideal has to be saturated by the variables corresponding
     
    647650            number_of_sat_var++;
    648651          }
    649           else
    650             if(H[k][j]< BigInt(0))
     652          else if(H[k][j]< BigInt(0))
    651653              // then the ideal is automatically saturated by the variables
    652654              // corresponding to negative components
    653655              ideal_saturated_by_var[j]=TRUE;
     656        }
    654657    }
    655658    else
     
    657660      for(int j=0;j<columns;j++)
    658661        if(ideal_saturated_by_var[j]==FALSE)
     662        {
    659663          if(H[k][j]< BigInt(0))
    660664            // ideal has to be saturated by the variables corresponding
     
    665669            number_of_sat_var++;
    666670          }
    667           else
    668             if(H[k][j]> BigInt(0))
     671          else if(H[k][j]> BigInt(0))
    669672              // then the ideal is automatically saturated by the variables
    670673              // corresponding to positive components
    671674              ideal_saturated_by_var[j]=TRUE;
     675        }
    672676    }
    673677  }
  • Makefile.am

    rca4d699 reeb5b0c  
    66
    77SUBDIRS = resources omalloc xalloc $(USE_FACTORY) \
    8 libpolys kernel numeric gfanlib dyn_modules \
     8libpolys kernel gfanlib dyn_modules \
    99IntegerProgramming Singular dox \
    1010emacs debian redhat desktop
    11 
    12 # PACKAGES = $(SUBDIRS)
    13 # TESTDIRS = omalloc $(USE_FACTORY) libpolys kernel Singular dyn_modules
    1411
    1512EXTRA_DIST = README autogen.sh git-version-gen
  • Singular/LIB/ehv.lib

    rca4d699 reeb5b0c  
    3434  componentEHV(I,P,L [,Strategy]);    a P-primary component for I
    3535  primdecEHV(I [,Strategy]);          a minimal primary decomposition of I
    36   compareLists(L, K);                 procedure for comparing the output of
     36  primDecsAreEquivalent(L, K);        procedure for comparing the output of
    3737                                      primary decomposition algorithms (checks
    3838                                      if the computed associated primes coincide)
     
    538538      ERROR("// Not implemented for this ordering, please change to global ordering.");
    539539    }
    540 
     540  if (size(I) == 0)  { return( ideal(0) ); }
    541541  //Compute the equidimensional radical J of I.
    542542  ideal J = equiRadEHV(I,#);
     
    10371037              if(printlevel > 2){"Input not homogeneous; must homogenize.";}
    10381038              def homoR=changeord(list(list("dp",1:nvars(basering))));
    1039               setring homoR;
     1039              setring homoR;
    10401040              ideal homoJ = fetch(base,K);
    10411041              homoJ = groebner(homoJ);
     
    13691369
    13701370/////////////////////////////////////////////////////////////////////
    1371 proc compareLists(list L, list K)
    1372 "USAGE:   checkLists(L,K); L,K list of ideals
     1371proc primDecsAreEquivalent(list L, list K)
     1372"USAGE:   primDecsAreEquivalent(L,K); L,K list of ideals
    13731373RETURN:  integer, 1 if the lists are the same up to ordering and 0 otherwise
    1374 EXAMPLE: example checkLists; shows an example"
     1374EXAMPLE: example primDecsAreEquivalent; shows an example"
    13751375{
    13761376  int s1 = size(L);
     
    14091409        }
    14101410    }
     1411  if ( size(N) != s1 )
     1412  {
     1413     return(0);
     1414  }
    14111415  return(1);
    14121416}
     
    14201424  list L1 = primdecGTZ(i);
    14211425  list L2 = primdecEHV(i);
    1422   compareLists(L1,L2);
    1423 }
    1424 
     1426  primDecsAreEquivalent(L1,L2);
     1427}
  • Singular/LIB/normal.lib

    rca4d699 reeb5b0c  
    925925   L = insert(L,0,1);
    926926   L[3] = delt;
     927   setring(P);
    927928   return(L);
    928929}
     
    49614962// The original test ideal is origJ.
    49624963// The original ring is R / I, where R is the basering.
     4964  intvec save_opt=option(get);
    49634965  int i;                                // counter
    49644966  int dbg = printlevel - voice + 2;     // dbg = printlevel (default: dbg = 0)
     
    50015003
    50025004  // ----- computation of the test ideal using the ring structure of Ai -----
    5003   intvec save_opt=option(get);
     5005 
    50045006  option(redSB);
    50055007  option(returnSB);
  • Singular/LIB/realclassify.lib

    rca4d699 reeb5b0c  
    606606    h = f-jet(f, 2)-corank_part(f);
    607607  }
    608   poly g = cleardenom(f-jet(f, 2));
     608  poly g = f-jet(f, 2);
     609  poly lead_g = leadcoef(g);
     610  if(lead_g > 0)
     611  {
     612    g = g/lead_g;
     613  }
     614  if(lead_g < 0)
     615  {
     616    g = -g/lead_g;
     617  }
    609618
    610619  return(list(c, lambda, k, g));
  • Singular/LIB/resolve.lib

    rca4d699 reeb5b0c  
    99
    1010REFERENCES:
    11 [1] J.Kollar: Lectures on Resolution of Singularities, Princeton University Press (2007)
    12 @*  (contains large overview over various known methods for curves and surfaces as well as
    13 @*   a detailed description of the approach in the general case)
    14 [2] A.Bravo, S.Encinas, O.Villamayor: A Simplified Proof of Desingularisation and
    15 @*  Applications, Rev. Math. Iberoamericana 21 (2005), 349-458
    16 @*  (description of the algorithmic proof of desingularization in characteristic zero
    17 @*  which underlies this implementation)
     11[1] J.Kollar: Lectures on Resolution of Singularities, Princeton University Press (2007)@*
     12  (contains large overview over various known methods for curves and surfaces as well as@*
     13   a detailed description of the approach in the general case)@*
     14[2] A.Bravo, S.Encinas, O.Villamayor: A Simplified Proof of Desingularisation and@*
     15  Applications, Rev. Math. Iberoamericana 21 (2005), 349-458@*
     16  (description of the algorithmic proof of desingularization in characteristic zero
     17    which underlies this implementation)@*
    1818[3] A.Fruehbis-Krueger: Computational Aspects of Singularities, in J.-P. Brasselet,
    19 @*  J.Damon et al.: Singularities in Geometry and Topology, World Scientific
    20 @*  Publishing, 253--327 (2007)
    21 @*  (chapter 4 contains a detailed discussion on algorithmic desingularization and
    22 @*  efficiency aspects thereof)
     19  J.Damon et al.: Singularities in Geometry and Topology, World Scientific
     20  Publishing, 253--327 (2007)@*
     21  (chapter 4 contains a detailed discussion on algorithmic desingularization and
     22  efficiency aspects thereof)
    2323
    2424PROCEDURES:
  • Singular/LIB/ring.lib

    rca4d699 reeb5b0c  
    3232proc optionIsSet(string optionName)
    3333"
    34 USAGE:       @code{optionIsSet( optionName );}
    35 PARAMETERS:  @code{optionName}: a name(string) of an option of interest
    36 RETURN:      true, if the by  @code{optionName} given option is active, false otherwise.
     34USAGE:       optionIsSet( optionName )
     35PARAMETERS:  optionName: a name as string of an option of interest
     36RETURN:      true, if the by optionName given option is active, false otherwise.
    3737EXAMPLE:     example optionIsSet;
    3838"
  • Singular/LIB/standard.lib

    rca4d699 reeb5b0c  
    711711  }
    712712  list Lhilb = Philb,w;
    713   return(Lhilb);
     713  setring(P); return(Lhilb);
    714714}
    715715example
  • Singular/LIB/tropical.lib

    rca4d699 reeb5b0c  
    133133  parameterSubstitute()   substitutes in the polynomial the parameter t by t^N
    134134  tropicalSubst()         makes certain substitutions in a tropical polynomial
    135   randomPoly()            computes a polynomial with random coefficients
     135  randomPolyInT()         computes a polynomial with random coefficients
    136136  cleanTmp()              clears /tmp from files created by other procedures
    137137
     
    38183818/////////////////////////////////////////////////////////////////////////
    38193819
    3820 proc randomPoly (int d,int ug, int og, list #)
    3821 "USAGE:      randomPoly(d,ug,og[,#]);   d, ug, og int, # list
     3820proc randomPolyInT (int d,int ug, int og, list #)
     3821"USAGE:      randomPolyInT(d,ug,og[,#]);   d, ug, og int, # list
    38223822ASSUME:      the basering has a parameter t
    38233823RETURN:      poly, a polynomial of degree d where the coefficients are
     
    38263826             instead either of the form t^j as above or they are zero,
    38273827             and this is chosen randomly
    3828 EXAMPLE:     example randomPoly;   shows an example"
    3829 {
     3828EXAMPLE:     example randomPolyInT;   shows an example"
     3829{
     3830  if (defined(t)!=-1) { ERROR("basering has no paramter t");}
    38303831  int i,j,k;
    38313832  def BASERING=basering;
     
    38543855  if ((size(randomPolynomial)<3) and (nnn>=3))
    38553856  {
    3856     randomPolynomial=randomPoly(d,ug,og,#);
     3857    randomPolynomial=randomPolyInT(d,ug,og,#);
    38573858  }
    38583859  return(randomPolynomial);
     
    38633864   echo=2;
    38643865   ring r=(0,t),(x,y),dp;
    3865    randomPoly(3,-2,5);
    3866    randomPoly(3,-2,5,1);
     3866   randomPolyInT(3,-2,5);
     3867   randomPolyInT(3,-2,5,1);
    38673868}
    38683869
  • Singular/Makefile.am

    rca4d699 reeb5b0c  
    33GIT_VERSION := $(shell $(top_srcdir)/git-version-gen $(top_srcdir)/.tarball-git-version)
    44
    5 AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} -I${top_srcdir}/numeric -I${top_builddir}/numeric -I${top_srcdir}/kernel -I${top_builddir}/kernel -I${top_srcdir}/libpolys -I${top_builddir}/libpolys $(GMP_CFLAGS) -I${top_srcdir}/factory/include -I${top_builddir}/factory/include $(FACTORY_CFLAGS) $(NTL_CFLAGS) $(FLINT_CFLAGS)   -DGIT_VERSION='"$(GIT_VERSION)"'
     5AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} -I${top_srcdir}/kernel -I${top_builddir}/kernel -I${top_srcdir}/libpolys -I${top_builddir}/libpolys $(GMP_CFLAGS) -I${top_srcdir}/factory/include -I${top_builddir}/factory/include $(FACTORY_CFLAGS) $(NTL_CFLAGS) $(FLINT_CFLAGS)   -DGIT_VERSION='"$(GIT_VERSION)"'
    66
    77if HAVE_GFANLIB
     
    1111endif
    1212
    13 # AM_LDFLAGS = libSingular.la ${top_builddir}/numeric/libnumeric.la ${top_builddir}/kernel/libkernel.la
     13# AM_LDFLAGS = libSingular.la ${top_builddir}/kernel/libkernel.la
    1414
    1515########################### Dynamic Modules... #########################
     
    174174
    175175libSingular_la_LDFLAGS    = ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} -release ${PACKAGE_VERSION}
    176 
    177 libSingular_la_LIBADD      = ${EMBED_PYOBJECT} ${top_builddir}/numeric/libnumeric.la ${top_builddir}/kernel/libkernel.la \
    178 ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD}
    179 
     176libSingular_la_LIBADD      = ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} ${EMBED_PYOBJECT} ${top_builddir}/kernel/libkernel.la
    180177
    181178libSingular_includedir = ${includedir}/singular/Singular
  • Singular/attrib.cc

    rca4d699 reeb5b0c  
    306306  {
    307307    res->rtyp=INT_CMD;
    308     res->data=(void *)(rField_is_Ring((ring)v->Data()));
     308    res->data=(void *)(long)(rField_is_Ring((ring)v->Data()));
    309309  }
    310310  else if (strcmp(name,"qringNF")==0)
  • Singular/cntrlc.cc

    rca4d699 reeb5b0c  
    426426  int pid;
    427427  char buf[16];
    428   char * args[4] = { (char*)"gdb", (char*)"Singularg", NULL, NULL };
     428  char * args[4] = { (char*)"gdb", (char*)"Singular", NULL, NULL };
    429429
    430430  #ifdef HAVE_FEREAD
  • Singular/extra.cc

    rca4d699 reeb5b0c  
    1414#include <misc/auxiliary.h>
    1515
    16 #define SI_DONT_HAVE_GLOBAL_VARS
    1716#include <factory/factory.h>
    1817
     
    7776#include <kernel/shiftgb.h>
    7877#include <kernel/linearAlgebra.h>
     78
     79#include <kernel/hutil.h>
    7980
    8081// for tests of t-rep-GB
     
    31533154      else
    31543155  #endif
     3156  /*==================== Roune Hilb  =================*/
     3157       if (strcmp(sys_cmd, "hilbroune") == 0)
     3158       {
     3159         ideal I;
     3160         if ((h!=NULL) && (h->Typ()==IDEAL_CMD))
     3161         {
     3162           I=(ideal)h->CopyD();
     3163           slicehilb(I);
     3164         }
     3165         else return TRUE;
     3166         return FALSE;
     3167       }
    31553168  /*==================== minor =================*/
    31563169      if (strcmp(sys_cmd, "minor")==0)
     
    38713884  if (strcmp(sys_cmd,"reservedLink")==0)
    38723885  {
    3873     si_link ssiCommandLink();
     3886    extern si_link ssiCommandLink();
    38743887    res->rtyp=LINK_CMD;
    38753888    si_link p=ssiCommandLink();
  • Singular/feOpt.cc

    rca4d699 reeb5b0c  
    1414#include <stdlib.h>
    1515
    16 #define SI_DONT_HAVE_GLOBAL_VARS
    1716#include <factory/factory.h>
    1817
  • Singular/fegetopt.c

    rca4d699 reeb5b0c  
    182182extern char *getenv(const char *name);
    183183extern int  strcmp (const char *s1, const char *s2);
    184 /*extern int  strncmp(const char *s1, const char *s2, int n);*/
     184extern int  strncmp(const char *s1, const char *s2, size_t n);
    185185
    186186static int my_strlen(const char *s);
  • Singular/fehelp.cc

    rca4d699 reeb5b0c  
    10571057                   sprintf(temp,"%d-%d-%d",SINGULAR_VERSION/1000,
    10581058                                 (SINGULAR_VERSION % 1000)/100,
    1059                                  (SINGULAR_VERSION % 100));
     1059                                 (SINGULAR_VERSION % 100)/10);
    10601060                   strcat(sys,temp);
    10611061                   i=strlen(sys);
  • Singular/interpolation.cc

    rca4d699 reeb5b0c  
    88#include <kernel/mod2.h>
    99#include <misc/options.h>
    10 #define SI_DONT_HAVE_GLOBAL_VARS
    11 #  include <factory/factory.h>
     10#include <factory/factory.h>
    1211
    1312#include <misc/intvec.h>
  • Singular/iparith.cc

    rca4d699 reeb5b0c  
    24952495{
    24962496  res->data=(char *)idSect((ideal)u->Data(),(ideal)v->Data());
    2497   setFlag(res,FLAG_STD);
    24982497  return FALSE;
    24992498}
  • Singular/ipassign.cc

    rca4d699 reeb5b0c  
    223223
    224224  number p = (number)a->CopyD(NUMBER_CMD);
     225  n_Normalize(p, currRing->cf);
    225226
    226227  if (n_IsZero(p, currRing->cf))
    227228  {
    228229    n_Delete(&p, currRing);
    229 
    230 
    231230    if( nCoeff_is_transExt(currRing->cf) )
    232231    {
     
    236235      return FALSE;
    237236    }
    238 
    239237    WarnS("cannot set minpoly to 0 / alg. extension?");
    240 
    241 //    return TRUE;
     238    return TRUE;
    242239  }
    243240
     
    251248  }
    252249
    253   n_Normalize(p, currRing->cf);
    254 
    255   assume( currRing->cf->extRing->qideal == NULL );
    256 
    257250  AlgExtInfo A;
    258251
    259252  A.r = rCopy(currRing->cf->extRing); // Copy  ground field!
     253  // if minpoly was already set:
     254  if( currRing->cf->extRing->qideal != NULL ) id_Delete(&(A.r->qideal),A.r);
    260255  ideal q = idInit(1,1);
     256  if ((p==NULL) ||(DEN((fraction)(p)) != NULL) ||(NUM((fraction)p)==NULL))
     257  {
     258    Werror("Could not construct the alg. extension: minpoly==0");
     259    // cleanup A: TODO
     260    rDelete( A.r );
     261    return TRUE;
     262  }
    261263
    262264  assume( DEN((fraction)(p)) == NULL ); // minpoly must be a fraction with poly numerator...!!
  • Singular/ipshell.cc

    rca4d699 reeb5b0c  
    1515#include <misc/mylimits.h>
    1616
    17 #define SI_DONT_HAVE_GLOBAL_VARS
    1817#include <factory/factory.h>
    1918
     
    5857#include <coeffs/rmodulon.h>
    5958
    60 #include <numeric/mpr_base.h>
    61 #include <numeric/mpr_numeric.h>
     59#include <kernel/numeric/mpr_base.h>
     60#include <kernel/numeric/mpr_numeric.h>
    6261
    6362#include <math.h>
     
    19401939  if (L->nr==2)
    19411940  {
    1942     R->cf->extRing->N=1;
     1941    //R->cf->extRing->N=1;
    19431942    if (L->m[2].rtyp!=STRING_CMD)
    19441943    {
     
    19461945      return;
    19471946    }
    1948     R->cf->extRing->names=(char**)omAlloc0(rPar(R)*sizeof(char_ptr));
    1949     R->cf->extRing->names[0]=omStrDup((char *)L->m[2].data);
     1947    //(rParameter(R))=(char**)omAlloc0(rPar(R)*sizeof(char_ptr));
     1948    rParameter(R)[0]=omStrDup((char *)L->m[2].data);
    19501949  }
    19511950  // ----------------------------------------
     
    21992198    lists v=(lists)L->m[1].Data();
    22002199    R->N = v->nr+1;
     2200    if (R->N<=0)
     2201    {
     2202      WerrorS("no ring variables");
     2203      goto rCompose_err;
     2204    }
    22012205    R->names   = (char **)omAlloc0(R->N * sizeof(char_ptr));
    22022206    int i;
  • Singular/janet.cc

    rca4d699 reeb5b0c  
    793793}
    794794
     795#if 0
    795796static void go_right(NodeM *current,poly_function disp)
    796797{
     
    803804}
    804805
    805 #if 0
    806806void ForEach(TreeM *t,poly_function disp)
    807807{
  • Singular/libparse.cc

    rca4d699 reeb5b0c  
    10621062#ifdef STANDALONE_PARSER
    10631063#include <Singular/utils.h>
    1064 
    1065 // int initializeGMP(){ return 1; } // NEEDED FOR MAIN APP. LINKING!!!
    1066 int mmInit(void) {return 1; } // ? due to SINGULAR!!!...???
    10671064
    10681065  #define HAVE_LIBPARSER
     
    33763373    if(brace3>0) { yylp_errno=YYLP_MISS_BR3; }
    33773374    if(quote>0) { yylp_errno=YYLP_MISSQUOT; }
    3378     /* printf("{=%d, (=%d, [=%d\n", brace1, brace2, brace3);/**/
     3375    //printf("{=%d, (=%d, [=%d\n", brace1, brace2, brace3);
    33793376    if(feof(yyin)) return 1; else return 0;
    33803377  }
  • Singular/libparse.ll

    rca4d699 reeb5b0c  
    1010#ifdef STANDALONE_PARSER
    1111  #include <Singular/utils.h>
    12 
    13 //   int initializeGMP(){ return 1; } // NEEDED FOR MAIN APP. LINKING!!!
    14   int mmInit(void) {return 1; } // ? due to SINGULAR!!!...???
    1512
    1613  #define HAVE_LIBPARSER
     
    834831    if(brace3>0) { yylp_errno=YYLP_MISS_BR3; }
    835832    if(quote>0) { yylp_errno=YYLP_MISSQUOT; }
    836     /* printf("{=%d, (=%d, [=%d\n", brace1, brace2, brace3);/**/
     833    //printf("{=%d, (=%d, [=%d\n", brace1, brace2, brace3);
    837834    if(feof(yyin)) return 1; else return 0;
    838835  }
  • Singular/links/silink.cc

    rca4d699 reeb5b0c  
    418418  si_link_extension ns = (si_link_extension)omAlloc0Bin(s_si_link_extension_bin);
    419419
    420   if (0) 0; // dummy
     420  if (0)
     421    ; // dummy
    421422#ifdef HAVE_DBM
    422423  else if (strcmp(type, "DBM") == 0)
  • Singular/minpoly.cc

    rca4d699 reeb5b0c  
    363363    }
    364364  }
     365  abort();
    365366}
    366367
  • Singular/misc_ip.cc

    rca4d699 reeb5b0c  
    2020#include <Singular/si_signals.h>
    2121
    22 #define SI_DONT_HAVE_GLOBAL_VARS
    2322#include <factory/factory.h>
    2423
     
    402401#undef HAVE_DYN_RL
    403402#endif
    404 
    405 #define SI_DONT_HAVE_GLOBAL_VARS
    406403
    407404//#ifdef HAVE_LIBPARSER
     
    12671264  errorreported = 0;
    12681265}
    1269 
    1270 /*
    1271 #ifdef LIBSINGULAR
    1272 // the init routines of factory need mmInit
    1273 int mmInit( void )
    1274 {
    1275   return 1;
    1276 }
    1277 #endif
    1278 */
  • Singular/mmalloc.h

    rca4d699 reeb5b0c  
    1010#include <stdlib.h>
    1111
    12 int mmInit(void);
    1312#undef reallocSize
    1413#undef freeSize
  • Singular/newstruct.cc

    rca4d699 reeb5b0c  
    607607  if (ring_changed)
    608608    f->m->SetRing(f,save_ring,FALSE);
     609  return FALSE;
    609610}
    610611
  • Singular/pyobject.cc

    rca4d699 reeb5b0c  
    269269  void append_iter(self iterator) {
    270270    ptr_type item;
    271     while (item = PyIter_Next(iterator)) {
     271    while ((item = PyIter_Next(iterator))) {
    272272      PyList_Append(*this, item);
    273273      Py_DECREF(item);
  • Singular/subexpr.cc

    rca4d699 reeb5b0c  
    954954        return INT_CMD;
    955955      case VMINPOLY:
     956        data=NULL;
    956957        return NUMBER_CMD;
    957958      case VNOETHER:
     959        data=NULL;
    958960        return POLY_CMD;
    959961      //case COMMAND:
  • Singular/test.cc

    rca4d699 reeb5b0c  
    5252
    5353#include <polys/clapsing.h>
    54 
    55 
    56 // int initializeGMP(){ return 1; } // NEEDED FOR MAIN APP. LINKING!!!
    57 int mmInit(void) {return 1; } // ? due to SINGULAR!!!...???
    5854
    5955
  • Singular/tesths.cc

    rca4d699 reeb5b0c  
    1717#include <misc/options.h>
    1818
    19 #define SI_DONT_HAVE_GLOBAL_VARS
    2019#include <factory/factory.h>
    2120
     
    5352extern int siInit(char *);
    5453
    55 // int initializeGMP(){ return 1; }
    56 
    5754int mmInit( void )
    5855{
     
    7370    char** argv)   /* parameter array */
    7471{
    75   //mmInit();
     72  mmInit();
    7673  // Don't worry: ifdef OM_NDEBUG, then all these calls are undef'ed
    7774  omInitRet_2_Info(argv[0]);
  • Singular/walk.cc

    rca4d699 reeb5b0c  
    437437#endif
    438438
     439#ifdef CHECK_IDEAL_MWALK
    439440static void idString(ideal L, const char* st)
    440441{
     
    448449  Print(" %s;", pString(L->m[nL-1]));
    449450}
    450 
    451 //unused
    452 //#if 0
     451#endif
     452
     453#if defined(CHECK_IDEAL_MWALK) || defined(ENDWALKS)
    453454static void headidString(ideal L, char* st)
    454455{
     
    462463  Print(" %s;", pString(pHead(L->m[nL-1])));
    463464}
    464 //#endif
    465 
    466 //unused
    467 //#if 0
     465#endif
     466
     467#if defined(CHECK_IDEAL_MWALK) || defined(ENDWALKS)
    468468static void idElements(ideal L, char* st)
    469469{
     
    503503  omFree(K);
    504504}
    505 //#endif
     505#endif
    506506
    507507
     
    46114611  clock_t tim;
    46124612  nstep=0;
    4613   int i,k,nwalk,endwalks = 0;
     4613  int i,nwalk,endwalks = 0;
    46144614  int nV = currRing->N;
    46154615
     
    46964696    else
    46974697    {
    4698     NORMAL_GW:
    46994698#ifndef  BUCHBERGER_ALG
    47004699      if(isNolVector(curr_weight) == 0)
     
    47784777    }
    47794778
    4780   NEXT_VECTOR:
     4779  //NEXT_VECTOR:
    47814780    to = clock();
    47824781    //intvec* next_weight = MkInterRedNextWeight(curr_weight,target_weight,G);
     
    67906789  clock_t tinput = clock();
    67916790#endif
    6792   int nsteppert=0, i, k, nV = currRing->N, nwalk=0, npert_tmp=0;
     6791  int nsteppert=0, i, nV = currRing->N, nwalk=0, npert_tmp=0;
    67936792  int *npert=(int*)omAlloc(2*nV*sizeof(int));
    67946793  ideal Gomega, M,F,  G1, Gomega1, Gomega2, M1, F1;
  • Tst/New.lst

    rca4d699 reeb5b0c  
    4040New/trans_ext_denominator.tst
    4141New/ntDiff.tst
     42New/bug_std.tst
  • Tst/Short.lst

    r7b00dbc reeb5b0c  
    5858Short/bug_532_s.tst
    5959Short/bug_538_s.tst
     60Short/bug_540.tst
    6061Short/bug_5.tst
    6162Short/bug_6.tst
  • Tst/Short/absfact.res.gz.uu

    rca4d699 reeb5b0c  
    11begin 640 absfact.res.gz
    2 M'XL("%M1WE(``V%B<V9A8W0N<F5S`.V<6V_<N!7'W_TIB&"!E4:231[>Q#5F
    3 M'K9%BP6*/L1Y6\2!QAEO!G7MP*/44CY]#^="<BQ*\KB;/#1RD+'$VT@Z__/3
    4 M(77DJW=__>V?A!"V(/_X[5?RIM[4YW?KY9O+LZM]#2P(%GY8WZ_K)+T\L[_)
    5 M8D&JY>:VNJG/[U=/YYNZJEU[OB!N6YSO1CTT/AY9!BW5.7E<W_]!WI(Y26B:
    6 MDZ3)6_QU]]FWUPNR^?3P6,\)]87E@GQ^N&O)9]NQT+/F&DA&8-;,VNV6FC7X
    7 MV5X+_&1B7RAT.DMD`UD+Z36?)4W1IM?"#VH6Y./JEESAF'CH?\-#?WA<?UTE
    8 MGU-R>79V<4%^#HM_)C>/JZI>?235]B1RLKXG3Y_6-Y^PX&Z]J>T@#W=?ZM6'
    9 MVVV?#4GJ3RL[SJ&"["M2LMZ0#6ZM/I[;^G</I+JY66TV!#OLQGJX[?3*2=U^
    10 M7I%D?;MM=E_]>X7'_E1M2+79K/^X7WVT8]4/V]K'5?WE\9[\I[K[LDI_L17[
    11 MG\VJMD>?7*67G0.^/"/.5HPNPK:NF$7,PV`1&>MW]OX7')!\P(TYNP#&0.[V
    12 MX?T\*=!,5<9,.FLRQJW%,FO8*C,BW;7B[^<2*Y,JG;6[$O%^CC8\P_[;@5G.
    13 M<IZ+,VSIOPB;^R_!\:ZA4+.J0"VX41,LS&3JQK1=\/=N3'`GQ=T%(&_]J8J=
    14 M:-X=:^;7O_R=H&XBLL&:'TTYTE^X=_["J9AP]+APG#6+)FN]#8O**L<+(P&T
    15 M,N/;0JLE:U.G$X$Z80,ZJ8;$@0K::M5**"*3TO.-F7/RK_7=7:`70#<:0Q[$
    16 M?`H@1-Z>8KZ6#[$+;3:;H2&Q!8(<O_P*]W]XHH&($@UD[.JK46'*4#ZS9UP:
    17 MTMI.7P<E.2&!CO$&RF'>=$S]+FKJ'X]"8&(4XC1B;,Y.H)`#S_]F;0X>&YQW
    18 ML,'%.#9X3+A<#6&#[W@;X"+7VA*CPJ/,BZ;*VKQRC<M%1'.VP^598CND^>%B
    19 M!)V,/R]!.^<EV/AY"8B<E^#'YR4*/+?PU(28B'BJCP@9):*(W:K%^*VZ\$BT
    20 M.#S<4<.[=',4O+$<7GI3CD=KPAU=&8.G,!,\7R4,26/PE+$X18['_J$N@A"N
    21 M^!["D,%$58K]]/-Q3G/D3IWF'SUVI#P09MY<BRRIKWD!-09_4"/C<`=+I"T1
    22 MQ:ZT8+;<$5WBY-;]V,:J$-@CPPZ9PL$R.YBEI:^R@V7"UMDJ?R2Z#V7YF\V;
    23 MF&XGFMG+5D9I)LVX0/WMO8%:9DVMBH;7O&!JA@6B8!3$K*EE4:L,-W@-V$9D
    24 MVV(L;40&MK3`QI"![;7KC%W!CF`[U3@1Q=8<&Q4U#(0/FT#JFV#*<3@A%3CG
    25 MHSM-Q?I8A[(A/;J9>+>_>!#CG>+_;\H1'H9*[H.S0$)J$?+QB(Y*.SIZ]JNR
    26 M-^::(-6C-!.%E*:C4J/>\-U[X\'4U`W(8I#0T`^)B0_]5M,\Q@<M_FRC!6OE
    27 M6G7\4^M^_]1NA7RN+QCSY?V+W).+QHU=QE>^R_%5`GOE3S)X"3$O+?GDI:\R
    28 MG(AY:2F_@=V4=]12=QRU+)VC)C2O\F6:[Y8Y`H<M3>2&:NCDK2<:W;"HMYKQ
    29 M:6D_FV\B)C<\YJJF]W'0Y*J#5HL^(S+CJ^XG&DU[/S5EQT^-&?531JGSTZ3*
    30 M6'JQ]%5L\M;3[([3GIBW,CH^T]I=_&29GB(`1D7$:QF5D]>^RGHJXK6,CJ\,
    31 MO])X_M$JH^:Y]S)&Q[W7IBL<>^^L\94PK;.]0@5!8D3HPVQ\-N1EX!9-7K^:
    32 MP<(\@T`5:F`=;%H&&[:LCODW*[^W8?TS1`:TX_?`QOW>9T]XO[>I8;Y!;P+%
    33 MY/L#"HGG4#`8GV.Q(WELC6*?A82WA).%`BI&`-`3`5YMWS)&`!A_A/(MS&N3
    34 M-=PVZW#`IE",<8#S*`=:WZ`W;6#BP(!.>#1S@/'Q"5RO4&9#*36C4M$Q$O#>
    35 MY*F)!*,6CN5/,3'^G.+;&-@F#KEM.*21L]V#_&.?=ZE"M_,D2/[FVRV)6R(3
    36 MZ37X]@<$,#(_0L!M+)_W!Y/!48H0\YXN7N#I0=:'310+$H+\KMCN^A1OB?O6
    37 M4H%4`/_Q7`XEA$`!509A6@AD08G8E;#4?<=1RK=Q)Q6F8/I84?1CY'9"R(!V
    38 MH@B1+T"(5\Y6"\ZLSY.^0R5)M^NE(U$X\/)<(B\1T=&0#'76E8X,^"0=GSA&
    39 M%=3E.`:,DHY1MDD#K<A:E4'#6_S2IA6%1DIIF^&8,8&5"B^$:G!/8"%^M!Y?
    40 M\H"O(WB1Y)9/T4N/,&6P<G#E+^1+@A>F3(@U#RX4D'V-Q;[%PL3AQ9:DT+L7
    41 M6HZ2VP9)YB1H%:E1<6KW\LKSS#8F0UAQ?Q8.5L_@TZ>(B5;["Q>EE3J%5EOK
    42 M(R&8WAD?MV3:I=?+Q5`P564*.HSJB$$%^%$'_#S"/CS*O^9/1R&2>AXB95\Q
    43 M-H+L2?@F?F+4"8HFJL0$I.)S(O42K`AG=9OUE8$%"<R^HIY@&T`_#:5]A9H1
    44 M*!#$3^25`Z;".9*_?Z@!8$R\&#!WE!<O2.0*WB6I\%Z16H/OMUJWA:9_L<UM
    45 M6%+:6XZ.6%T'9-".#*Q_R42'2R:\J&"9@:Z6O`"]%.D%3NB6<G_,J%&]Y'C8
    46 MOG/_6Q@3-N(ZTG%LZ'%L.`/LC1+J:KDWT=980Q/OFZ#;363BK4-J^#F1[J?&
    47 M]`AUR-I1:I3CU/@NQBX#6)0.%KPOC"BC883(GDK?1.S^L(#]XP%?-HG7=RFG
    48 M^.(TZ=BDL_BEU%&"E.//[=@%EP8M+12`8`9*R87D1DIJ2BI*;C1E(+3"_XQA
    49 M2"B5P!HI*%4**#+*R:D0'/M2H-@)0QXM4)'=LC929H,<+90HI>*`-QQ%-1.`
    50 M7V'#7Z!:":/!4+S!V:ZEH*7"@V.E.2$J`JDJ4=A/7FANOP?#:&,8I8;9&;W"
    51 M,94L%0,3":[+P&<?_4S+)NM%[6'8%%&]1N`&^BYH+/V:F?&$@S#4L@&,9:C@
    52 M58&"VB.S4]I&2T\*QT3!46B9*)6-S,QV#B<51)1E?,(W,^$?1]DO&N5?]\M&
    53 M'<V\M9HY]#R\FW&+/5N!$"Y:F"6L:""XAGWO:DS`[=6CB2P3`3UI_=*NX+6B
    54 MV-X:7ZJ?[HT9:/`ZQUM_*#"!YA6&!1KC"=!3>/*G&=83`"@2(.`?2R]_.OLO
    55 ([:LX;KI)````
     2M'XL("#S)Z%(``V%B<V9A8W0N<F5S`.V<6V_CN!7'W_,IB,$"*UE20A[>I`WL
     3MAVW18H&B#Y.\+28#.;%WC*9)$&L:*9^^A[Z0=$1)=KHS#QUE,([$FR6=__GI
     4MD#K*U?5??_LG(83-R#]^^Y5\J-;5^?UJ_N'R[&I7`S."A9]7#ZLJBB_/S&\R
     5MFY%ROEZ6M]7YP^+E?%V5E6W/9\1NB_/MJ/O&AR-+KZ4Z)\^KAS_(1S(E$8U3
     6M$M5I@[_NGUQ[/2/K+X_/U9105YC/R-/C?4.>3,=,3^H;(`F!23UI-EMJ4N-G
     7M<R/PDXE=H=#Q))(U)`W$-WP2U5D3WP@W:#$C=XLEN<(Q\=#_AH?^^+QZ741/
     8M,;D\.[NX(#_[Q3^3V^=%62WN2+DYB92L'LC+E]7M%RRX7ZTK,\CC_==J\7FY
     9MZ;,F4?5E8<;95Y!=14Q6:[+&K<7=N:F_?B3E[>UBO2;883O6X[+5*R55\[0@
     10MT6JY:?90_GN!Q_Y2KDFY7J_^>%C<F;&JQTWM\Z+Z^OQ`_E/>?UW$OYB*W<]Z
     11M49FCCZ[BR]8!7YX1:RM&9WY;6\P"YF$P"XSU._OT"PY(/N/&E%T`8R"W^_!I
     12M&F5HIC)A13RI$\:-Q1)CV#(I1+QMQ3]-)59&93QIMB7BTQ1M>(;]-P.SE*4\
     13M%6?8TGT1-G=?@N/=0*8F989:L*-&6)C(V(YINN#O[9A@3XK;"T`^NE,56]%<
     14M'VKFU[_\G:!N`K+!FA]-.=)=N&MWX51(.'I8.-::69TTSH99:93CA!$!6IGQ
     15M3:'1DK&IU8E`G;`>G91]XD`%;;1J)!202>[XQHIS\J_5_;VG%T`W&D(>A'P*
     16MP$?>CF*NEO>Q"VTVF:`AL06"'+_\"O=_>**!"!(-9.CJJT%A2E\^DS=<ZM/:
     17M5E][)5DA@0[Q!O)^WK1,?1TT]8]'(2A"%.(T8&S.3J"0!<__9FT.#AN<M[#!
     18MQ3`V>$BX7/5A@V]YZ^$BU=H0H\2C3+.Z3)JTM(WS64!SIL/E660ZQ.G^8GB=
     19M"G=>@K;.2[#A\Q(0."_!#\]+9'AN_JD),1+Q5!\1,DA$$;I5B^%;=>:0:'"X
     20MOZ/Z=^GZ('AC*1Q[4PY':\(>71Z"IRA&>+Y+&)*&X"E#<8H<COU]77@A7/8]
     21MA"&]B:H4N^GG\Y2FR)TJ3N\<=J3<$V9:WX@DJFYX!A4&?U`AXW`'2Z0I$=FV
     22M-&.FW!)=XN36_IC&*A/8(\$.B<+!$C.8H:6K,H,EPM29*G<DN@MEZ8?UAY!N
     23M1YJ9RY8':2:+88&ZVWL-E4SJ2F4UKWC&U`0+1,8HB$E=R:Q2"6[P"K"-2#;%
     24M6%J+!$QIAHTA`=-KVQF[@AG!=*IP(HJM.3;**N@)']:>U-?>E&-_0LISSF=[
     25MFHIUL0YE0SIT,_)N=_$@Q#O%_]^4(QP,E=P%9YZ$U,SGXP$=E;9T=.Q7>6?,
     26M-4*J0VE%$%*:#DJ-.L.W[XU[4U,[(`M!0D,W)$8^=%M-\Q`?M/BSC>:ME6O5
     27M\D^MN_U3VQ7RJ;Y@S)5W+W*/+AHV=AY>^<Z'5PG,E3_)X#F$O#3GHY>^RW`B
     28MY*6Y_`9V4\Y1<]URU#RWCAK1M$SG<;I=YO`<-B\"-]2"CMYZHM$+%O368GA:
     29MVLWFVX#)"QYRU:+S<=#HJKU6"SXC*H97W4\TFG9^6N0M/RV*03]EE%H_C<J$
     30MQ1=S5\5&;SW-[CCM"7DKH\,SK>W%C^;Q*0)@5`2\EE$Y>NV[K*<"7LOH\,KP
     31M.XWG'JTR6KSU7L;HL/>:=(5#[YW4KA+&=;9WJ,!+C/!]F`W/AIP,[*+)^U<S
     32MF)]GX*E"]:R#C<M@_9;5(?]F^?<VK'N&R("V_![8L-^[[`GG]R8US#7H3*`8
     33M?;]'(>$<"@;#<RQV((^-4<RS$/^6<+)00(4(`'HDP+OMFX<(`,./4+Z%>4VR
     34MAMUF+0Z8%(HA#G`>Y$#C&G2F#8P<Z-$)#V8.,#X\@>L4RJ0OI690*CI$`MZ9
     35M/#628-#"H?PI)H:?4WP;`YO$(;L-^S1RMGV0?^CS-E5H.8V\Y&^^V9*X)1(1
     36MWX!KOT<`(],#!"Q#^;P_F`P.4H28\W1QA*=[61\F4<Q+"'*[8K/K4KPE[AM+
     37M>5(!_,=3V9<0`AF4"?AI(9!X)6);PF+['0<IWX4]*3\%T\6*HALCRQ$A/=H)
     38M(D0>@1"GG(T6K%G?)GW[2I)VUTE'HG#@^%PB)Q'1TI#T==:6CO3X)"V?.$85
     39MU.8X>HR2EE&F20V-2!J50,T;_-*Z$9E&2FF3X9@P@94*+X2J<4]@(7XT#E]R
     40MCZ\#>)%HR<?HI4.8TELYN'(7\IC@A:G"QYH#%PK(O,9BWF)A8O]B2Y3I[0LM
     41M!\EMO22S$C2*U*@XM7UYY6UF&Y,^K+@["PNK-_#I4L1(J]V%"])*G4*KC?61
     42M$$QOC8];,F[3ZW@Q9$R5B8(6HUIB4!Y^U!X_S[`+C]+7].4@1%)O0Z3D%6,C
     43M2%Z$:^(F1JV@:*1*2$`J/"=2QV!%6*N;K*\$#$A@\HIZ@DT`_=*7]N5K1J!`
     44M$#^!5PZ8\N=([OZA>H`Q\J+'W$%>')'(Y;U+4N*](C8&WVTU=@M-?[3-35B2
     45MFUN.#EA=>V30E@RL>\E$^TLF/"MAGH`NYSP#/1?Q!4[HYG)WS*A1/>=XV*YS
     46M]UL8(S;".M)A;.AA;%@#[(SBZVJ^,]'&6'T3[UNOVVU@XJU]:K@YD>ZFQO@(
     47MM<_:06KDP]3X+L;./5CD%A:\*XS(@V&$2%YRUT1L_["`^>,!7]>1TW<NQ_CB
     48M-.F8I+/PI=1!@N3#S^W8!9<%6EHH`,$*R"47DA=2TB*G(N>%I@R$5OB?,0P)
     49MI1)8(P6E2@%%1EDY98)C7PH4.V'(HP4JLEW6!,I,D*.%$KE4'/"&HZAF`O`K
     50M3/@+5"M1:"@HWN!,UUS07.'!L;PX(2H"J4J1F4^>:6Z^!\/HHF"4%LS,Z!6.
     51MJ62N&!2!X#KW?/;9S;1,LE[0'@4;(ZKW"+R`K@L:2K]FQ7#"@9FO:ZV!*0^7
     52M/"LV+"TQHMF!\["H:1>A2)4X7F\H-M053Z0P(C;:Y3PTAR]<PC<K_#^.LELT
     53M2E]WRT8MS7PTFMGWW+^;L<2>C4`(9PU,(I;5X%W#KG<U1N!VZK$(+!,!/6G]
     54MTJS@-2+;W!J/%4_[Q@S4>YWCHSL4&$'S#L,"#?$$Z!$\^?,-ZP@`%`G@\8_%
     55-ES^=_1?Y-J19NDD`````
    5656`
    5757end
  • Tst/Short/bug_ring_quot.res.gz.uu

    rca4d699 reeb5b0c  
    1 begin 644 bug_ring_quot.res.gz
    2 M'XL("/1VBE$``V)U9U]R:6YG7W%U;W0N<F5S`(V1P6Z#,`R&[SR%U>T`:I8V
    3 M%.@J1`[3+DAK-XW=*H3HR%`D!ET(*O#T"ZP-[6T7Q[$_1_\?1Q_/X0X`"(67
    4 M\`EFLI:XX(>9;T3GCDU!%1-><FE:OC&<0"D<FCP1O,R3GZ:2N&0G7,M4ZJD5
    5 M!9T[&!8+.(FJS(&5DHG7DKVE7$1']LG30G,NAN%%>`^XHG(FD-FB#O46RHZ3
    6 M'H\"SUA:0!AX;3_O>C3&>3\A:PJUS,Q0R4WV)`Y<U?9ZE=MQ<(8U^TAA<,"5
    7 M,#-$[G]&-I,WLAR]28'A#IS-4M?)Q<NMF1LK1'WM=Y4U!8-=L&\1B9&*73P!
    8 M*PUL@R_!V-_%M*T)<:[T[]#VHK_M'EK-N%>"/3SE:SRN=EA<4YO$\N^-7SVD
    9 &:3H0`@``
     1begin 640 bug_ring_quot.res.gz
     2M'XL("#WCZ%(``V)U9U]R:6YG7W%U;W0N<F5S`&V146^",!#'W_T4%[<'B*5:
     3M!9PA]&'9"\G49>[-$(*C(TT8N%(B\.E7G+::[.5ZO?M=\__W=A\OT08`"(77
     4MZ!G&LI:XX(=Q,-I=.G,*JICPDDO+#D;#"93"H<D3P<L\^6DJB4MVPK5,I9Y:
     5M4-"YBV$ZA9.HRAQ8*9G8ENPMY6)W9)\\+33G81A>A/>0*RIG`EDMZE!OH^QH
     6M]/@4>,;2`J+0;_M)UZ-SG/0&65*H969%2FZR)W'HJ;;?JWP>AQ=8LT\4!@=<
     7M";,BY/T_XKA=[WAF:&7<D=G9G108'L!=S72=7-W<V[DS0]3G?E=94S#8A/L6
     8MD1BIV,4&6&A@'7X)QOXNUMPVB'OC8(/65P=MY[2:\6X$^]CD2WQ>[K"ZIK:(
     9-'3R.?@'0`-^J$@(`````
    1010`
    1111end
  • Tst/Short/ok_s.lst

    rca4d699 reeb5b0c  
    66alias
    77allres_s
     8arcAtPoint
    89barei_s
    910betti_s
     
    5253bug_51
    5354bug_52
     55bug_526
    5456bug_53
    5557bug_54
     
    7880bug_newstruct
    7981bug_newstruct2
     82bug_newstruct3
    8083bug_pd
    8184bug_presolve
     
    8992bug_rp
    9093bug_ring_quot
     94bug_sres
     95bug_sres_betti
     96bug_sres_cyc5
    9197bug_tr132
    9298bug_tr134
     
    102108; do not try bug_tr276 without 2.2 GB RAM free
    103109; bug_tr276
    104 ; do not try bug_tr280 without MP
    105 ; bug_tr280
    106110bug_tr288
    107111bug_tr300
     
    124128bug_532_s
    125129bug_538_s
     130bug_x_i_j
    126131brnoeth_s
    127132countedref_s
     133classify_s
    128134cyc5_lp
    129 bug_sres
    130 bug_sres_betti
    131 bug_sres_cyc5
    132 bug_x_i_j
    133 classify_s
    134135dbm_s
    135136deform_s
    136137decodegb
     138dim-test_for_rings_over_integers
    137139div_lift_s
    138140ecyclic_5_32003_lp
     
    179181Gonnet-83_32003_dp_slim
    180182Gonnet-83_1_32003_dp_slim
    181 ;MP general_s
    182183graphics
    183184groebner_s
     
    212213mora_7
    213214mora_9
    214 ; mpsr_s
    215215mres_s
    216216ncfactor_example2_7FromMaster_s
     
    237237qhw_s
    238238quotient_s
     239rcyclic_13_32003_lp
     240rcyclic_14_32003_lp
    239241rcyclic_15_32003_lp
    240242rcyclic_16_32003_lp
     
    246248reduce_s
    247249res_s
     250resjung
    248251resources_s
    249252resultantp_s
     
    253256ringmodn
    254257ringsum
     258ringutils_s
    255259ringz
     260rInit
    256261schwarz_6_32003_lp
    257262schwarz_7_32003_lp
     
    272277sres_s
    273278std_s
    274 ;MP stratify
    275279string
    276280tasks_s
     
    321325Zdim_s
    322326ZidealAdd_s
     327sba_s
  • Tst/Short/tropical.tst

    rca4d699 reeb5b0c  
    168168f=t2x+1/t*y-1;
    169169tropicalSubst(f,2,x,x+t,y,tx+y+t2);
    170 randomPoly(3,-2,5);
    171 randomPoly(3,-2,5,1);
     170randomPolyInT(3,-2,5);
     171randomPolyInT(3,-2,5,1);
    172172//////////////////////////////
    173173tst_status(1);$
  • configure.ac

    rca4d699 reeb5b0c  
    219219AC_CONFIG_FILES([xalloc/Makefile])
    220220AC_CONFIG_FILES([kernel/Makefile])
    221 AC_CONFIG_FILES([numeric/Makefile])
     221AC_CONFIG_FILES([kernel/numeric/Makefile])
    222222
    223223AC_CONFIG_SUBDIRS([gfanlib])
  • dyn_modules/Makefile.am

    rca4d699 reeb5b0c  
    11ACLOCAL_AMFLAGS = -I ../m4
    22
    3 PACKAGES=bigintm syzextra callgfanlib callpolymake
    4 SUBDIRS=$(PACKAGES)
     3SUBDIRS=bigintm syzextra callgfanlib callpolymake
    54
    6 TESTDIRS=$(PACKAGES)
    75
  • dyn_modules/bigintm/Makefile.am

    rca4d699 reeb5b0c  
    44
    55if ENABLE_P_PROCS_DYNAMIC
    6 #  noinst_LTLIBRARIES=bigintm.la
    7   check_LTLIBRARIES=bigintm.la
     6  noinst_LTLIBRARIES=bigintm.la
     7#  check_LTLIBRARIES=bigintm.la
    88 
    99endif
  • dyn_modules/callpolymake/Makefile.am

    rca4d699 reeb5b0c  
    1010
    1111# forcefully enable exceptions for polymake
    12 POLYMAKE_CFLAGS = -fexceptions -frtti
    13 
    1412AM_LDFLAGS      = ${PM_LDFLAGS}
    1513# -release ${PACKAGE_VERSION}
     
    2422-I${top_srcdir}/libpolys -I${top_builddir}/libpolys  \
    2523-I${top_builddir}/factory/include $(GMP_CFLAGS) $(PM_INC) $(PM_CFLAGS) \
    26 $(POLYMAKE_CFLAGS) $(FACTORY_CFLAGS)
     24$(POLYMAKE_CXXFLAGS) $(FACTORY_CFLAGS)
    2725
    2826P_PROCS_CPPFLAGS_COMMON = -DDYNAMIC_VERSION
    2927
    30 polymake_la_CPPFLAGS = ${MYINCLUDES} ${P_PROCS_CPPFLAGS_COMMON} ${POLYMAKE_CFLAGS}
    31 polymake_la_CXXFLAGS = ${POLYMAKE_CFLAGS}
    32 polymake_la_CFLAGS = ${POLYMAKE_CFLAGS}
     28polymake_la_CPPFLAGS = ${MYINCLUDES} ${P_PROCS_CPPFLAGS_COMMON} ${POLYMAKE_CXXFLAGS}
     29polymake_la_CXXFLAGS = ${POLYMAKE_CXXFLAGS}
     30polymake_la_CFLAGS = ${POLYMAKE_CXXFLAGS}
    3331
    3432if ENABLE_P_PROCS_DYNAMIC
  • factory/Makefile.am

    rca4d699 reeb5b0c  
    11ACLOCAL_AMFLAGS = -I ../m4
    22
    3 PACKAGES=include/factory libfac
    4 SUBDIRS=$(PACKAGES)
     3SUBDIRS=include/factory libfac
    54
    65AM_CPPFLAGS = -I${builddir}/include -I${srcdir}/include $(FLINT_CFLAGS) ${GMP_CFLAGS} ${NTL_CFLAGS} ${OMALLOC_CFLAGS}
  • factory/canonicalform.cc

    rca4d699 reeb5b0c  
    2323CanonicalForm readCF( ISTREAM& );
    2424#endif /* NOSTREAMIO */
    25 
    26 //{{{ initialization
    27 int initializeCharacteristic();
    28 
    29 #ifdef SINGULAR
    30 extern int mmInit(void);
    31 #endif
    32 
    33 int
    34 initCanonicalForm( void )
    35 {
    36     static bool initialized = false;
    37     if ( ! initialized ) {
    38 #if defined (SINGULAR)
    39         (void)mmInit();
    40 #endif
    41 
    42         (void)initializeCharacteristic();
    43         initialized = true;
    44     }
    45     return 1;
    46 }
    47 //}}}
    4825
    4926//{{{ constructors, destructors, selectors
  • factory/canonicalform.h

    rca4d699 reeb5b0c  
    5656}
    5757
    58 
    59 int initCanonicalForm( void );
    60 #ifndef SI_DONT_HAVE_GLOBAL_VARS
    61 static int cf_is_initialized_now = initCanonicalForm();
    62 #endif
    6358
    6459//{{{ class CanonicalForm
  • factory/cf_char.cc

    rca4d699 reeb5b0c  
    1616static int theCharacteristic = 0;
    1717static int theDegree = 1;
    18 
    19 int initializeCharacteristic ()
    20 {
    21     theCharacteristic = 0;
    22     theDegree = 1;
    23     return 1;
    24 }
    2518
    2619void setCharacteristic( int c )
     
    6558}
    6659
    67 int getExp()
    68 {
    69   return InternalPrimePower::getk();
    70 }
    71 
    72 
    7360int getGFDegree()
    7461{
  • factory/cf_factor.cc

    rca4d699 reeb5b0c  
    4141#endif
    4242
    43 int getExp(); /* cf_char.cc */
    44 
    4543//static bool isUnivariateBaseDomain( const CanonicalForm & f )
    4644//{
  • factory/cf_factory.cc

    rca4d699 reeb5b0c  
    276276    else  if ( symmetric ) {
    277277        mpz_init( dummy );
     278        InternalPrimePower::initialize();
    278279        if ( mpz_cmp( InternalPrimePower::primepowhalf, InternalPrimePower::MPI( value ) ) < 0 )
    279280            mpz_sub( dummy, InternalPrimePower::MPI( value ), InternalPrimePower::primepow );
  • factory/facFqSquarefree.cc

    rca4d699 reeb5b0c  
    239239
    240240  CanonicalForm buffer;
    241 #ifdef HAVE_NTL
     241#if defined(HAVE_NTL) || (HAVE_FLINT && __FLINT_VERSION_MINOR >= 4)
    242242  if (alpha.level() == 1)
    243243#endif
     
    252252    fmpz_clear (qq);
    253253  }
    254 #else
     254#elif defined(HAVE_NTL)
    255255  else
    256256  {
  • factory/int_pp.cc

    rca4d699 reeb5b0c  
    1717int InternalPrimePower::prime;
    1818int InternalPrimePower::exp;
    19 int InternalPrimePower::initialized = InternalPrimePower::initialize();
     19bool InternalPrimePower::initialized = false;
    2020
    2121
     
    2727InternalPrimePower::InternalPrimePower( const int i )
    2828{
     29    initialize();
    2930    mpz_init_set_si( thempi, i );
    3031    if ( mpz_cmp_si( thempi, 0 ) < 0 ) {
     
    4142InternalPrimePower::InternalPrimePower( const char * str, const int base )
    4243{
     44    initialize();
    4345    mpz_init_set_str( thempi, str, base );
    4446    if ( mpz_cmp_si( thempi, 0 ) < 0 ) {
     
    7678}
    7779
    78 int InternalPrimePower::initialize()
    79 {
     80void InternalPrimePower::initialize()
     81{
     82    if (initialized) return;
    8083    mpz_init_set_si( primepow, 3 );
    8184    mpz_init_set_si( primepowhalf, 1 );
    8285    prime = 3;
    8386    exp = 1;
    84     return 1;
     87    initialized = true;
    8588}
    8689
     
    8992{
    9093    ASSERT( p > 1 && k > 0, "illegal prime power" );
     94    initialize();
    9195    if ( p != prime || k != exp ) {
    9296        mpz_set_si( primepow, p );
     
    96100        exp = k;
    97101    }
    98 }
    99 
    100 int
    101 InternalPrimePower::getp()
    102 {
    103     return prime;
    104 }
    105 
    106 int
    107 InternalPrimePower::getk()
    108 {
    109     return exp;
    110102}
    111103
  • factory/int_pp.h

    rca4d699 reeb5b0c  
    2727private:
    2828    mpz_t thempi;
    29     static int initialized;
     29    static bool initialized;
    3030    static int prime;
    3131    static int exp;
    3232    static mpz_t primepow;
    3333    static mpz_t primepowhalf;
    34     static int initialize();
     34    static void initialize();
    3535    static mpz_ptr MPI( const InternalCF * const c );
    3636public:
     
    5656
    5757    static void setPrimePower( int p, int k );
    58     static int getp();
    59     static int getk();
    6058
    6159    bool is_imm() const;
  • factory/test.cc

    rca4d699 reeb5b0c  
    22#include <resources/feFopen.h>
    33#include "cf_assert.h"
    4 
    5 int mmInit(void) {
    6 #ifdef SINGULAR
    7 // this is a hack to make linker baheave on Mac OS X 10.6.8 / 64 bit
    8 // since otherwise both debug and release DYNAMIC tests failed there with:
    9 /*
    10 dyld: lazy symbol binding failed: Symbol not found: __Z7feFopenPKcS0_
    11 Referenced from: ...BUILDDIR/factory/.libs/libfactory_g-3.1.3.dylib
    12 Expected in: flat namespace
    13    
    14 dyld: Symbol not found: __Z7feFopenPKcS0_
    15 Referenced from: ...BUILDDIR/factory/.libs/libfactory_g-3.1.3.dylib
    16 Expected in: flat namespace
    17 */
    18 const int f = (int)(long)(void*)feFopen;
    19 return (f ^ f) + 1;
    20 #else
    21 return 1;
    22 #endif
    23 }
    244
    255int test2 (int p)
  • kernel/GMPrat.cc

    rca4d699 reeb5b0c  
    3131
    3232// ----------------------------------------------------------------------------
    33 //  Miscellaneous
    34 // ----------------------------------------------------------------------------
    35 
    36 Rational Rational::save;    // dummy variable
    37 
    38 // ----------------------------------------------------------------------------
    3933//  disconnect a rational from its reference
    4034// ----------------------------------------------------------------------------
    4135
    42 void    Rational::disconnect( )
     36void    Rational::disconnect()
    4337{
    4438    if( p->n>1)
    4539    {
     40        rep *old_p = p;
    4641        p->n--;
    4742        p = new rep;
    48     }
    49     else
    50     {
    51         mpq_clear(p->rat);
    52     }
    53     mpq_init(p->rat);
     43        mpq_init(p->rat);
     44        mpq_set(p->rat, old_p->rat);
     45    }
    5446}
    5547
     
    116108Rational& Rational::operator=(int a)
    117109{
    118   disconnect();
     110  if( p->n>1)
     111  {
     112    p->n--;
     113    p = new rep;
     114    mpq_init(p->rat);
     115  }
    119116  mpq_set_si(p->rat,(long) a,1);
    120117  return *this;
     
    223220Rational::operator+=(const Rational &a)
    224221{
    225   mpq_set(save.p->rat,p->rat);
    226   disconnect();
    227   mpq_add(p->rat,save.p->rat,a.p->rat);
     222  disconnect();
     223  mpq_add(p->rat,p->rat,a.p->rat);
    228224  return *this;
    229225}
     
    232228Rational::operator-=(const Rational &a)
    233229{
    234   mpq_set(save.p->rat,p->rat);
    235   disconnect();
    236   mpq_sub(p->rat,save.p->rat,a.p->rat);
     230  disconnect();
     231  mpq_sub(p->rat,p->rat,a.p->rat);
    237232  return *this;
    238233}
     
    241236Rational::operator*=(const Rational &a)
    242237{
    243   mpq_set(save.p->rat,p->rat);
    244   disconnect();
    245   mpq_mul(p->rat,save.p->rat,a.p->rat);
     238  disconnect();
     239  mpq_mul(p->rat,p->rat,a.p->rat);
    246240  return *this;
    247241}
     
    250244Rational::operator/=(const Rational &a)
    251245{
    252   mpq_set(save.p->rat,p->rat);
    253   disconnect();
    254   mpq_div(p->rat,save.p->rat,a.p->rat);
     246  disconnect();
     247  mpq_div(p->rat,p->rat,a.p->rat);
    255248  return *this;
    256249}
     
    263256Rational::operator++()
    264257{
    265   mpq_set(save.p->rat,p->rat);
    266   *this=1;
    267   mpq_add(p->rat,p->rat,save.p->rat);
     258  disconnect();
     259  mpz_add(mpq_numref(p->rat), mpq_numref(p->rat), mpq_denref(p->rat));
    268260  return *this;
    269261}
     
    274266  Rational erg(*this);
    275267
    276   mpq_set(save.p->rat,p->rat);
    277   *this=1;
    278   mpq_add(p->rat,p->rat,save.p->rat);
     268  disconnect();
     269  mpz_add(mpq_numref(p->rat), mpq_numref(p->rat), mpq_denref(p->rat));
    279270  return erg;
    280271}
     
    283274Rational::operator--()
    284275{
    285   mpq_set(save.p->rat,p->rat);
    286   *this=1;
    287   mpq_sub(p->rat,save.p->rat,p->rat);
     276  disconnect();
     277  mpz_sub(mpq_numref(p->rat), mpq_numref(p->rat), mpq_denref(p->rat));
    288278  return *this;
    289279}
     
    294284  Rational erg(*this);
    295285
    296   mpq_set(save.p->rat,p->rat);
    297   *this=1;
    298   mpq_sub(p->rat,save.p->rat,p->rat);
     286  disconnect();
     287  mpz_sub(mpq_numref(p->rat), mpq_numref(p->rat), mpq_denref(p->rat));
    299288  return erg;
    300289}
  • kernel/GMPrat.h

    rca4d699 reeb5b0c  
    2222
    2323    rep             *p;
    24     static Rational save;
    2524
    2625    void disconnect();
  • kernel/Makefile.am

    rca4d699 reeb5b0c  
    11ACLOCAL_AMFLAGS = -I ../m4
    22# TODO: use ${top_srcdir} instead of .. in the above?
     3
     4SUBDIRS=numeric
    35
    46noinst_LTLIBRARIES = libkernel.la
     
    5860endif
    5961
    60 libkernel_la_LIBADD   =  ${top_builddir}/libpolys/polys/libpolys.la $(USE_FACTORY)
     62libkernel_la_LIBADD   =  ${builddir}/numeric/libnumeric.la ${top_builddir}/libpolys/polys/libpolys.la $(USE_FACTORY)
    6163### libkernel_la_LDFLAGS    = -release ${PACKAGE_VERSION}
    6264
     
    8284CLEANFILES = $(TESTS)
    8385# $(BUILT_SOURCES)
     86
  • kernel/fglmcomb.cc

    rca4d699 reeb5b0c  
    1313#include <kernel/mod2.h>
    1414
    15 #define SI_DONT_HAVE_GLOBAL_VARS
    1615#include <factory/factory.h>
    1716#include <misc/options.h>
  • kernel/hilb.cc

    rca4d699 reeb5b0c  
    1717#include <kernel/hutil.h>
    1818#include <kernel/stairc.h>
     19//ADICHANGES:
     20#include <kernel/ideals.h>
     21#include <kernel/kstd1.h>
     22#include<gmp.h>
     23#include<vector>
     24
    1925
    2026static int  **Qpol;
    2127static int  *Q0, *Ql;
    2228static int  hLength;
     29   
    2330
    2431static int hMinModulweight(intvec *modulweight)
     
    213220  }
    214221}
    215 
     222// ---------------------------------- ADICHANGES ---------------------------------------------
     223//!!!!!!!!!!!!!!!!!!!!! Just for Monomial Ideals !!!!!!!!!!!!!!!!!!!!!!!!!!!!
     224
     225//returns the degree of the monomial
     226static int DegMon(poly p)
     227{
     228    #if 1
     229    int i,deg;
     230    deg = 0;
     231    for(i=1;i<=currRing->N;i++)
     232    {
     233        deg = deg + p_GetExp(p, i, currRing);
     234    }
     235    return(deg);
     236    #else
     237    return(p_Deg(p, currRing));
     238    #endif
     239}
     240
     241//Tests if the ideal is sorted by degree
     242static bool idDegSortTest(ideal I)
     243{
     244    if((I == NULL)||(idIs0(I)))
     245    {
     246        return(TRUE);
     247    }
     248    for(int i = 0; i<IDELEMS(I)-1; i++)
     249    {
     250        if(DegMon(I->m[i])>DegMon(I->m[i+1]))
     251        {
     252            idPrint(I);
     253            Werror("Ideal is not deg sorted!!");
     254            return(FALSE);
     255        }
     256    }
     257    return(TRUE);
     258}
     259
     260//adds the new polynomial at the coresponding position
     261//and simplifies the ideal
     262static ideal SortByDeg_p(ideal I, poly p)
     263{
     264    int i,j;
     265    if((I == NULL) || (idIs0(I)))
     266    {
     267        ideal res = idInit(1,1);
     268        res->m[0] = p;
     269        return(res);
     270    }
     271    idSkipZeroes(I);
     272    #if 1
     273    for(i = 0; (i<IDELEMS(I)) && (DegMon(I->m[i])<=DegMon(p)); i++)
     274    {
     275        if(p_DivisibleBy( I->m[i],p, currRing))
     276        {
     277            return(I);
     278        }
     279    }
     280    for(i = IDELEMS(I)-1; (i>=0) && (DegMon(I->m[i])>=DegMon(p)); i--)
     281    {
     282        if(p_DivisibleBy(p,I->m[i], currRing))
     283        {
     284            I->m[i] = NULL;
     285        }
     286    }
     287    if(idIs0(I))
     288    {
     289        idSkipZeroes(I);
     290        I->m[0] = p;
     291        return(I);
     292    }
     293    #endif
     294    idSkipZeroes(I);
     295    //First I take the case when all generators have the same degree
     296    if(DegMon(I->m[0]) == DegMon(I->m[IDELEMS(I)-1]))
     297    {
     298        if(DegMon(p)<DegMon(I->m[0]))
     299        {
     300            idInsertPoly(I,p);
     301            idSkipZeroes(I);
     302            for(i=IDELEMS(I)-1;i>=1; i--)
     303            {
     304                I->m[i] = I->m[i-1];
     305            }
     306            I->m[0] = p;
     307            return(I);
     308        }
     309        if(DegMon(p)>=DegMon(I->m[IDELEMS(I)-1]))
     310        {
     311            idInsertPoly(I,p);
     312            idSkipZeroes(I);
     313            return(I);
     314        }
     315    }
     316    if(DegMon(p)<=DegMon(I->m[0]))
     317    {
     318        idInsertPoly(I,p);
     319        idSkipZeroes(I);
     320        for(i=IDELEMS(I)-1;i>=1; i--)
     321        {
     322            I->m[i] = I->m[i-1];
     323        }
     324        I->m[0] = p;
     325        return(I);
     326    }
     327    if(DegMon(p)>=DegMon(I->m[IDELEMS(I)-1]))
     328    {
     329        idInsertPoly(I,p);
     330        idSkipZeroes(I);
     331        return(I);
     332    }
     333    for(i = IDELEMS(I)-2; ;)
     334    {
     335        if(DegMon(p)==DegMon(I->m[i]))
     336        {
     337            idInsertPoly(I,p);
     338            idSkipZeroes(I);
     339            for(j = IDELEMS(I)-1; j>=i+1;j--)
     340            {
     341                I->m[j] = I->m[j-1];
     342            }
     343            I->m[i] = p;
     344            return(I);
     345        }
     346        if(DegMon(p)>DegMon(I->m[i]))
     347        {
     348            idInsertPoly(I,p);
     349            idSkipZeroes(I);
     350            for(j = IDELEMS(I)-1; j>=i+2;j--)
     351            {
     352                I->m[j] = I->m[j-1];
     353            }
     354            I->m[i+1] = p;
     355            return(I);
     356        }
     357        i--;
     358    }
     359}
     360
     361//it sorts the ideal by the degrees
     362static ideal SortByDeg(ideal I)
     363{
     364    if(idIs0(I))
     365    {
     366        return(I);
     367    }
     368    idSkipZeroes(I);
     369    int i;
     370    ideal res;
     371    idSkipZeroes(I);
     372    res = idInit(1,1);
     373    res->m[0] = poly(0);
     374    for(i = 0; i<=IDELEMS(I)-1;i++)
     375    {
     376        res = SortByDeg_p(res, I->m[i]);
     377    }
     378    idSkipZeroes(res);
     379    //idDegSortTest(res);
     380    return(res);
     381}
     382
     383//idQuot(I,p) for I monomial ideal, p a ideal with a single monomial.
     384ideal idQuotMon(ideal Iorig, ideal p)
     385{
     386    if(idIs0(Iorig))
     387    {
     388        ideal res = idInit(1,1);
     389        res->m[0] = poly(0);
     390        return(res);
     391    }
     392    if(idIs0(p))
     393    {
     394        ideal res = idInit(1,1);
     395        res->m[0] = pOne();
     396        return(res);
     397    }
     398    ideal I = idCopy(Iorig);
     399    ideal res = idInit(IDELEMS(I),1);
     400    int i,j;
     401    int dummy;
     402    for(i = 0; i<IDELEMS(I); i++)
     403    {
     404        res->m[i] = p_Copy(I->m[i], currRing);
     405        for(j = 1; (j<=currRing->N) ; j++)
     406        {
     407            dummy = p_GetExp(p->m[0], j, currRing);
     408            if(dummy > 0)
     409            {
     410                if(p_GetExp(I->m[i], j, currRing) < dummy)
     411                {
     412                    p_SetExp(res->m[i], j, 0, currRing);
     413                }
     414                else
     415                {
     416                    p_SetExp(res->m[i], j, p_GetExp(I->m[i], j, currRing) - dummy, currRing);
     417                }
     418            }
     419        }
     420        p_Setm(res->m[i], currRing);
     421        if(DegMon(res->m[i]) == DegMon(I->m[i]))
     422        {
     423            res->m[i] = NULL;
     424        }
     425        else
     426        {
     427            I->m[i] = NULL;
     428        }
     429    }
     430    idSkipZeroes(res);
     431    idSkipZeroes(I);
     432    if(!idIs0(res))
     433    {
     434    for(i = 0; i<=IDELEMS(res)-1; i++)
     435    {
     436        I = SortByDeg_p(I,res->m[i]);
     437    }
     438    }
     439    //idDegSortTest(I);
     440    return(I);
     441}
     442
     443//id_Add for monomials
     444static ideal idAddMon(ideal I, ideal p)
     445{
     446    #if 1
     447    I = SortByDeg_p(I,p->m[0]);
     448    #else
     449    I = id_Add(I,p,currRing);
     450    #endif
     451    //idSkipZeroes(I);
     452    return(I);
     453}
     454
     455//searches for a variable that is not yet used (assumes that the ideal is sqrfree)
     456static poly ChoosePVar (ideal I)
     457{
     458    bool flag=TRUE;
     459    int i,j;
     460    poly res;
     461    for(i=1;i<=currRing->N;i++)
     462    {
     463        flag=TRUE;
     464        for(j=IDELEMS(I)-1;(j>=0)&&(flag);j--)
     465        {
     466            if(p_GetExp(I->m[j], i, currRing)>0)
     467            {
     468                flag=FALSE;
     469            }
     470        }
     471       
     472        if(flag == TRUE)
     473        {
     474            res = p_ISet(1, currRing);
     475            p_SetExp(res, i, 1, currRing);
     476            p_Setm(res,currRing);
     477            return(res);
     478        }
     479        else
     480        {
     481            p_Delete(&res, currRing);
     482        }
     483    }
     484    return(NULL); //i.e. it is the maximal ideal
     485}
     486
     487//choice XL: last entry divided by x (xy10z15 -> y9z14)
     488static poly ChoosePXL(ideal I)
     489{
     490    int i,j,dummy=0;
     491    poly m;
     492    for(i = IDELEMS(I)-1; (i>=0) && (dummy == 0); i--)
     493    {
     494        for(j = 1; (j<=currRing->N) && (dummy == 0); j++)
     495        {
     496            if(p_GetExp(I->m[i],j, currRing)>1)
     497            {
     498                dummy = 1;
     499            }
     500        }
     501    }
     502    m = p_Copy(I->m[i+1],currRing);
     503    for(j = 1; j<=currRing->N; j++)
     504    {
     505        dummy = p_GetExp(m,j,currRing);
     506        if(dummy >= 1)
     507        {
     508            p_SetExp(m, j, dummy-1, currRing);
     509        }
     510    }
     511    if(!p_IsOne(m, currRing))
     512    {
     513        p_Setm(m, currRing);
     514        return(m);
     515    }
     516    m = ChoosePVar(I);
     517    return(m);
     518}
     519
     520//choice XF: first entry divided by x (xy10z15 -> y9z14)
     521static poly ChoosePXF(ideal I)
     522{
     523    int i,j,dummy=0;
     524    poly m;
     525    for(i =0 ; (i<=IDELEMS(I)-1) && (dummy == 0); i++)
     526    {
     527        for(j = 1; (j<=currRing->N) && (dummy == 0); j++)
     528        {
     529            if(p_GetExp(I->m[i],j, currRing)>1)
     530            {
     531                dummy = 1;
     532            }
     533        }
     534    }
     535    m = p_Copy(I->m[i-1],currRing);
     536    for(j = 1; j<=currRing->N; j++)
     537    {
     538        dummy = p_GetExp(m,j,currRing);
     539        if(dummy >= 1)
     540        {
     541            p_SetExp(m, j, dummy-1, currRing);
     542        }
     543    }
     544    if(!p_IsOne(m, currRing))
     545    {
     546        p_Setm(m, currRing);
     547        return(m);
     548    }
     549    m = ChoosePVar(I);
     550    return(m);
     551}
     552
     553//choice OL: last entry the first power (xy10z15 -> xy9z15)
     554static poly ChoosePOL(ideal I)
     555{
     556    int i,j,dummy;
     557    poly m;
     558    for(i = IDELEMS(I)-1;i>=0;i--)
     559    {
     560        m = p_Copy(I->m[i],currRing);
     561        for(j=1;j<=currRing->N;j++)
     562        {
     563            dummy = p_GetExp(m,j,currRing);
     564            if(dummy > 0)
     565            {
     566                p_SetExp(m,j,dummy-1,currRing);
     567                p_Setm(m,currRing);
     568            }       
     569        }
     570        if(!p_IsOne(m, currRing))
     571        {
     572            return(m);
     573        }
     574        else
     575        {
     576            p_Delete(&m,currRing);
     577        }
     578    }
     579    m = ChoosePVar(I);
     580    return(m);
     581}
     582
     583//choice OF: first entry the first power (xy10z15 -> xy9z15)
     584static poly ChoosePOF(ideal I)
     585{
     586    int i,j,dummy;
     587    poly m;
     588    for(i = 0 ;i<=IDELEMS(I)-1;i++)
     589    {
     590        m = p_Copy(I->m[i],currRing);
     591        for(j=1;j<=currRing->N;j++)
     592        {
     593            dummy = p_GetExp(m,j,currRing);
     594            if(dummy > 0)
     595            {
     596                p_SetExp(m,j,dummy-1,currRing);
     597                p_Setm(m,currRing);
     598            }       
     599        }
     600        if(!p_IsOne(m, currRing))
     601        {
     602            return(m);
     603        }
     604        else
     605        {
     606            p_Delete(&m,currRing);
     607        }
     608    }
     609    m = ChoosePVar(I);
     610    return(m);
     611}
     612
     613//choice VL: last entry the first variable with power (xy10z15 -> y)
     614static poly ChoosePVL(ideal I)
     615{
     616    int i,j,dummy;
     617    bool flag = TRUE;
     618    poly m = p_ISet(1,currRing);
     619    for(i = IDELEMS(I)-1;(i>=0) && (flag);i--)
     620    {
     621        flag = TRUE;
     622        for(j=1;(j<=currRing->N) && (flag);j++)
     623        {
     624            dummy = p_GetExp(I->m[i],j,currRing);
     625            if(dummy >= 2)
     626            {
     627                p_SetExp(m,j,1,currRing);
     628                p_Setm(m,currRing);
     629                flag = FALSE;
     630            }       
     631        }
     632        if(!p_IsOne(m, currRing))
     633        {
     634            return(m);
     635        }
     636    }
     637    m = ChoosePVar(I);
     638    return(m);
     639}
     640
     641//choice VF: first entry the first variable with power (xy10z15 -> y)
     642static poly ChoosePVF(ideal I)
     643{
     644    int i,j,dummy;
     645    bool flag = TRUE;
     646    poly m = p_ISet(1,currRing);
     647    for(i = 0;(i<=IDELEMS(I)-1) && (flag);i++)
     648    {
     649        flag = TRUE;
     650        for(j=1;(j<=currRing->N) && (flag);j++)
     651        {
     652            dummy = p_GetExp(I->m[i],j,currRing);
     653            if(dummy >= 2)
     654            {
     655                p_SetExp(m,j,1,currRing);
     656                p_Setm(m,currRing);
     657                flag = FALSE;
     658            }       
     659        }
     660        if(!p_IsOne(m, currRing))
     661        {
     662            return(m);
     663        }
     664    }
     665    m = ChoosePVar(I);
     666    return(m);
     667}
     668
     669//choice JL: last entry just variable with power (xy10z15 -> y10)
     670static poly ChoosePJL(ideal I)
     671{
     672    int i,j,dummy;
     673    bool flag = TRUE;
     674    poly m = p_ISet(1,currRing);
     675    for(i = IDELEMS(I)-1;(i>=0) && (flag);i--)
     676    {
     677        flag = TRUE;
     678        for(j=1;(j<=currRing->N) && (flag);j++)
     679        {
     680            dummy = p_GetExp(I->m[i],j,currRing);
     681            if(dummy >= 2)
     682            {
     683                p_SetExp(m,j,dummy-1,currRing);
     684                p_Setm(m,currRing);
     685                flag = FALSE;
     686            }       
     687        }
     688        if(!p_IsOne(m, currRing))
     689        {
     690            return(m);
     691        }
     692    }
     693    m = ChoosePVar(I);
     694    return(m);
     695}
     696
     697//choice JF: last entry just variable with power -1 (xy10z15 -> y9)
     698static poly ChoosePJF(ideal I)
     699{
     700    int i,j,dummy;
     701    bool flag = TRUE;
     702    poly m = p_ISet(1,currRing);
     703    for(i = 0;(i<=IDELEMS(I)-1) && (flag);i++)
     704    {
     705        flag = TRUE;
     706        for(j=1;(j<=currRing->N) && (flag);j++)
     707        {
     708            dummy = p_GetExp(I->m[i],j,currRing);
     709            if(dummy >= 2)
     710            {
     711                p_SetExp(m,j,dummy-1,currRing);
     712                p_Setm(m,currRing);
     713                flag = FALSE;
     714            }       
     715        }
     716        if(!p_IsOne(m, currRing))
     717        {
     718            return(m);
     719        }
     720    }
     721    m = ChoosePVar(I);
     722    return(m);
     723}
     724
     725//chooses 1 \neq p \not\in S. This choice should be made optimal
     726static poly ChooseP(ideal I)
     727{
     728    poly m;
     729    //  TEST TO SEE WHICH ONE IS BETTER
     730    //m = ChoosePXL(I);
     731    //m = ChoosePXF(I);
     732    //m = ChoosePOL(I);
     733    //m = ChoosePOF(I);
     734    //m = ChoosePVL(I);
     735    //m = ChoosePVF(I);
     736    m = ChoosePJL(I);
     737    //m = ChoosePJF(I);
     738    return(m);
     739}
     740
     741//searches for a monomial of degree d>=2 and divides it by a variable (result monomial of deg d-1)
     742static poly SearchP(ideal I)
     743{
     744    int i,j,exp;
     745    poly res;
     746    if(DegMon(I->m[IDELEMS(I)-1])<=1)
     747    {
     748        res = ChoosePVar(I);
     749        return(res);
     750    }
     751    i = IDELEMS(I)-1;
     752    res = p_Copy(I->m[i], currRing);
     753    for(j=1;j<=currRing->N;j++)
     754    {
     755        exp = p_GetExp(I->m[i], j, currRing);
     756        if(exp > 0)
     757        {
     758            p_SetExp(res, j, exp - 1, currRing);
     759            p_Setm(res,currRing);
     760            return(res);
     761        }
     762    }
     763}
     764
     765//test if the ideal is of the form (x1, ..., xr)
     766static bool JustVar(ideal I)
     767{
     768    #if 0
     769    int i,j;
     770    bool foundone;
     771    for(i=0;i<=IDELEMS(I)-1;i++)
     772    {
     773        foundone = FALSE;
     774        for(j = 1;j<=currRing->N;j++)
     775        {
     776            if(p_GetExp(I->m[i], j, currRing)>0)
     777            {
     778                if(foundone == TRUE)
     779                {
     780                    return(FALSE);
     781                }
     782                foundone = TRUE;
     783            }
     784        }       
     785    }
     786    return(TRUE);
     787    #else
     788    if(DegMon(I->m[IDELEMS(I)-1])>1)
     789    {
     790        return(FALSE);
     791    }
     792    return(TRUE);
     793    #endif
     794}
     795
     796//computes the Euler Characteristic of the ideal
     797static void eulerchar (ideal I, int variables, mpz_ptr ec)
     798{
     799  loop
     800  {
     801    mpz_t dummy;
     802    if(JustVar(I) == TRUE)
     803    {
     804        if(IDELEMS(I) == variables)
     805        {
     806            mpz_init(dummy);
     807            if((variables % 2) == 0)
     808                {mpz_set_si(dummy, 1);}
     809            else
     810                {mpz_set_si(dummy, -1);}
     811            mpz_add(ec, ec, dummy);
     812        }
     813        //mpz_clear(dummy);
     814        return;       
     815    }
     816    ideal p = idInit(1,1);
     817    p->m[0] = SearchP(I);
     818    //idPrint(I);
     819    //idPrint(p);
     820    //printf("\nNow get in idQuotMon\n");
     821    ideal Ip = idQuotMon(I,p);
     822    //idPrint(Ip);
     823    //Ip = SortByDeg(Ip);
     824    int i,howmanyvarinp = 0;
     825    for(i = 1;i<=currRing->N;i++)
     826    {
     827        if(p_GetExp(p->m[0],i,currRing)>0)
     828        {
     829            howmanyvarinp++;
     830        }
     831    }   
     832    eulerchar(Ip, variables-howmanyvarinp, ec);
     833    id_Delete(&Ip, currRing);
     834    I = idAddMon(I,p);
     835  }
     836}
     837
     838//tests if an ideal is Square Free, if no, returns the variable which appears at powers >1
     839static poly SqFree (ideal I)
     840{
     841    int i,j;
     842    bool flag=TRUE;
     843    poly notsqrfree = NULL;
     844    if(DegMon(I->m[IDELEMS(I)-1])<=1)
     845    {
     846        return(notsqrfree);
     847    }
     848    for(i=IDELEMS(I)-1;(i>=0)&&(flag);i--)
     849    {
     850        for(j=1;(j<=currRing->N)&&(flag);j++)
     851        {
     852            if(p_GetExp(I->m[i],j,currRing)>1)
     853            {
     854                flag=FALSE;
     855                notsqrfree = p_ISet(1,currRing);
     856                p_SetExp(notsqrfree,j,1,currRing);
     857            }
     858        }
     859    }
     860    if(notsqrfree != NULL)
     861    {
     862        p_Setm(notsqrfree,currRing);
     863    }
     864    return(notsqrfree);
     865}
     866
     867//checks if a polynomial is in I
     868static bool IsIn(poly p, ideal I)
     869{
     870    //assumes that I is ordered by degree
     871    if(idIs0(I))
     872    {
     873        if(p==poly(0))
     874        {
     875            return(TRUE);
     876        }
     877        else
     878        {
     879            return(FALSE);
     880        }
     881    }
     882    if(p==poly(0))
     883    {
     884        return(FALSE);
     885    }
     886    int i,j;
     887    bool flag;
     888    for(i = 0;i<IDELEMS(I);i++)
     889    {
     890        flag = TRUE;
     891        for(j = 1;(j<=currRing->N) &&(flag);j++)
     892        {
     893            if(p_GetExp(p, j, currRing)<p_GetExp(I->m[i], j, currRing))
     894            {
     895                flag = FALSE;
     896            }
     897        }
     898        if(flag)
     899        {
     900            return(TRUE);
     901        }
     902    }
     903    return(FALSE);
     904}
     905
     906//computes the lcm of min I, I monomial ideal
     907static poly LCMmon(ideal I)
     908{
     909    if(idIs0(I))
     910    {
     911        return(NULL);
     912    }
     913    poly m;
     914    int dummy,i,j;
     915    m = p_ISet(1,currRing);
     916    for(i=1;i<=currRing->N;i++)
     917    {
     918        dummy=0;
     919        for(j=IDELEMS(I)-1;j>=0;j--)
     920        {
     921            if(p_GetExp(I->m[j],i,currRing) > dummy)
     922            {
     923                dummy = p_GetExp(I->m[j],i,currRing);
     924            }
     925        }
     926        p_SetExp(m,i,dummy,currRing);
     927    }
     928    p_Setm(m,currRing);
     929    return(m);
     930}
     931
     932//the Roune Slice Algorithm
     933void rouneslice(ideal I, ideal S, poly q, poly x, int &prune, int &moreprune, int &steps, int &NNN, mpz_ptr &hilbertcoef, int* &hilbpower)
     934{
     935  loop
     936  {
     937    (steps)++;
     938    int i,j;
     939    int dummy;
     940    poly m;
     941    ideal p, koszsimp;
     942    //----------- PRUNING OF S ---------------
     943    //S SHOULD IN THIS POINT BE ORDERED BY DEGREE
     944    for(i=IDELEMS(S)-1;i>=0;i--)
     945    {
     946        if(IsIn(S->m[i],I))
     947        {
     948            S->m[i]=NULL;
     949            prune++;
     950        }
     951    }
     952    idSkipZeroes(S);
     953    //----------------------------------------
     954    for(i=IDELEMS(I)-1;i>=0;i--)
     955    {
     956        m = p_Copy(I->m[i],currRing);
     957        for(j=1;j<=currRing->N;j++)
     958        {
     959            dummy = p_GetExp(m,j,currRing);
     960            if(dummy > 0)
     961            {
     962                p_SetExp(m,j,dummy-1,currRing);
     963            }       
     964        }
     965        p_Setm(m, currRing);
     966        if(IsIn(m,S))
     967        {
     968            I->m[i]=NULL;
     969            //printf("\n Deleted, since pi(m) is in S\n");pWrite(m);
     970        }
     971    }
     972    idSkipZeroes(I);
     973    //----------- MORE PRUNING OF S ------------
     974    m = LCMmon(I);
     975    if(m != NULL)
     976    {
     977        for(i=0;i<IDELEMS(S);i++)
     978        {     
     979            if(!(p_DivisibleBy(S->m[i], m, currRing))) 
     980            {
     981                S->m[i] = NULL;
     982                j++;
     983                moreprune++;
     984            }
     985            else
     986            {
     987                if(pLmEqual(S->m[i],m))
     988                {
     989                    S->m[i] = NULL;
     990                    moreprune++;
     991                }
     992            }
     993        }
     994    idSkipZeroes(S);
     995    }
     996    /*printf("\n---------------------------\n");
     997    printf("\n      I\n");idPrint(I);
     998    printf("\n      S\n");idPrint(S);
     999    printf("\n      q\n");pWrite(q);
     1000    getchar();*/
     1001   
     1002    if(idIs0(I))
     1003    {
     1004        id_Delete(&I, currRing);
     1005        id_Delete(&S, currRing);
     1006        p_Delete(&m, currRing);
     1007        break;
     1008    }
     1009    m = LCMmon(I);
     1010    if(!p_DivisibleBy(x,m, currRing))
     1011    {
     1012        //printf("\nx does not divide lcm(I)");
     1013        //printf("\nEmpty set");pWrite(q);
     1014        id_Delete(&I, currRing);
     1015        id_Delete(&S, currRing);
     1016        p_Delete(&m, currRing);
     1017        break;
     1018    }
     1019    m = SqFree(I);
     1020    if(m==NULL)
     1021    {
     1022        //printf("\n      Corner: ");
     1023        //pWrite(q);
     1024        //printf("\n      With the facets of the dual simplex:\n");
     1025        //idPrint(I);
     1026        mpz_t ec;
     1027        mpz_init(ec);
     1028        mpz_ptr ec_ptr = ec;
     1029        eulerchar(I, currRing->N, ec_ptr);
     1030        bool flag = FALSE;
     1031        if(NNN==0)
     1032            {
     1033                hilbertcoef = (mpz_ptr)omAlloc((NNN+1)*sizeof(mpz_t));
     1034                hilbpower = (int*)omAlloc((NNN+1)*sizeof(int));
     1035                mpz_init( &hilbertcoef[NNN]);
     1036                mpz_set(  &hilbertcoef[NNN], ec);
     1037                mpz_clear(ec);
     1038                hilbpower[NNN] = DegMon(q);
     1039                NNN++;
     1040            }
     1041        else
     1042        {
     1043            //I look if the power appears already
     1044            for(i = 0;(i<NNN)&&(flag == FALSE)&&(DegMon(q)>=hilbpower[i]);i++)
     1045            {
     1046                if((hilbpower[i]) == (DegMon(q)))
     1047                {
     1048                    flag = TRUE;
     1049                    mpz_add(&hilbertcoef[i],&hilbertcoef[i],ec_ptr);
     1050                }
     1051            }
     1052            if(flag == FALSE)
     1053            {
     1054                hilbertcoef = (mpz_ptr)omRealloc(hilbertcoef, (NNN+1)*sizeof(mpz_t));
     1055                hilbpower = (int*)omRealloc(hilbpower, (NNN+1)*sizeof(int));
     1056                mpz_init(&hilbertcoef[NNN]);
     1057                for(j = NNN; j>i; j--)
     1058                {
     1059                    mpz_set(&hilbertcoef[j],&hilbertcoef[j-1]);
     1060                    hilbpower[j] = hilbpower[j-1];
     1061                }
     1062                mpz_set(  &hilbertcoef[i], ec);
     1063                mpz_clear(ec);
     1064                hilbpower[i] = DegMon(q);
     1065                NNN++;
     1066            }
     1067        }
     1068        break;
     1069    }
     1070    m = ChooseP(I);
     1071    p = idInit(1,1);
     1072    p->m[0] = m;
     1073    ideal Ip = idQuotMon(I,p);
     1074    ideal Sp = idQuotMon(S,p);
     1075    poly pq = pp_Mult_mm(q,m,currRing);
     1076    rouneslice(Ip, Sp, pq, x, prune, moreprune, steps, NNN, hilbertcoef,hilbpower);
     1077    //id_Delete(&Ip, currRing);
     1078    //id_Delete(&Sp, currRing);
     1079    S = idAddMon(S,p);
     1080    p->m[0]=NULL;
     1081    id_Delete(&p, currRing); // p->m[0] was also in S
     1082    p_Delete(&pq,currRing);
     1083  }
     1084}
     1085
     1086//it computes the first hilbert series by means of Roune Slice Algorithm
     1087void slicehilb(ideal I)
     1088{
     1089    //printf("Adi changes are here: \n");
     1090    int i, NNN = 0;
     1091    int steps = 0, prune = 0, moreprune = 0;
     1092    mpz_ptr hilbertcoef;
     1093    int *hilbpower;
     1094    ideal S = idInit(1,1);
     1095    poly q = p_ISet(1,currRing);
     1096    ideal X = idInit(1,1);
     1097    X->m[0]=p_One(currRing);
     1098    for(i=1;i<=currRing->N;i++)
     1099    {
     1100            p_SetExp(X->m[0],i,1,currRing);   
     1101    }
     1102    p_Setm(X->m[0],currRing);
     1103    I = id_Mult(I,X,currRing);
     1104    I = SortByDeg(I);
     1105    //printf("\n-------------RouneSlice--------------\n");
     1106    rouneslice(I,S,q,X->m[0],prune, moreprune, steps, NNN, hilbertcoef, hilbpower);
     1107    //printf("\nIn total Prune got rid of %i elements\n",prune);
     1108    //printf("\nIn total More Prune got rid of %i elements\n",moreprune);
     1109    //printf("\nSteps of rouneslice: %i\n\n", steps);
     1110    mpz_t coefhilb;
     1111    mpz_t dummy;
     1112    mpz_init(coefhilb);
     1113    mpz_init(dummy);
     1114    printf("\n//  %8d t^0",1);
     1115    for(i = 0; i<NNN; i++)
     1116    {
     1117        if(mpz_sgn(&hilbertcoef[i])!=0)
     1118        {
     1119            gmp_printf("\n//  %8Zd t^%d",&hilbertcoef[i],hilbpower[i]);
     1120        }
     1121    }
     1122    omFreeSize(hilbertcoef, (NNN)*sizeof(mpz_t));
     1123    omFreeSize(hilbpower, (NNN)*sizeof(int));
     1124    //printf("\n-------------------------------------\n");
     1125}
     1126
     1127// -------------------------------- END OF CHANGES -------------------------------------------
    2161128static intvec * hSeries(ideal S, intvec *modulweight,
    2171129                int /*notstc*/, intvec *wdegree, ideal Q, ring tailRing)
     
    4721384}
    4731385
     1386
     1387
  • kernel/hutil.h

    rca4d699 reeb5b0c  
    7474void hDegreeSeries(intvec *s1, intvec *s2, int *co, int *mu);
    7575
     76void slicehilb(ideal I);
    7677#endif
  • kernel/khstd.cc

    rca4d699 reeb5b0c  
    155155#if ADIDEBUG
    156156PrintS("\nOriginal\n");
    157 int   j, l, k;
     157int   i, j, l, k;
    158158  if (hilb == NULL)
    159159    return;
  • kernel/kstd1.cc

    rca4d699 reeb5b0c  
    14571457  #endif
    14581458
    1459    /*reads the ecartWeights used for Graebes method from the
    14601459  /*reads the ecartWeights used for Graebes method from the
    14611460   *intvec ecart and set ecartWeights
  • kernel/kstdfac.cc

    rca4d699 reeb5b0c  
    641641        }
    642642
     643        n->P.pLength=0;
    643644        n->P.p=fac->m[i];
    644645        n->initEcart(&n->P);
  • kernel/kutil.cc

    rca4d699 reeb5b0c  
    396396      if (p_GetExp(p,i,r) > p_GetExp(h,i,r)) return ; // does not divide
    397397      #ifdef HAVE_RINGS
    398       ///should check also if the lc is a zero divisor, if it divides all the others
     398      // Note: As long as qring j forbidden if j contains integer (i.e. ground rings are
     399      //       domains), no zerodivisor test needed  CAUTION
    399400      if (rField_is_Ring(currRing) && currRing->OrdSgn == -1)
    400401              if(n_DivBy(p_GetCoeff(h,r->cf),lc,r->cf) == 0)
     
    725726  }
    726727
    727   if (i >= 0 && T->pLength != 0
    728   && ! rIsSyzIndexRing(currRing) && T->pLength != pLength(p))
     728  if ((i >= 0) && (T->pLength != 0)
     729  && (! rIsSyzIndexRing(currRing)) && (T->pLength != pLength(p)))
    729730  {
    730731    int l=T->pLength;
     
    55105511  {
    55115512    L->length = 0;
     5513    L->pLength = 0;
    55125514  }
    55135515
     
    75887590    if (strat->kNoether!=NULL) pSetComp(strat->kNoetherTail(), strat->ak);
    75897591  }
    7590   if(TEST_OPT_SB_1)
    7591   {
    7592     #ifdef HAVE_RINGS
    7593     if(!rField_is_Ring(currRing))
    7594     #endif
     7592  #ifdef HAVE_RINGS
     7593  if(rField_is_Ring(currRing))
     7594  {
     7595    /*Shdl=*/initSL(F, Q,strat); /*sets also S, ecartS, fromQ */
     7596  }
     7597  else
     7598  #endif
     7599  {
     7600    if(TEST_OPT_SB_1)
    75957601    {
    75967602        int i;
     
    76097615        idDelete(&P);
    76107616    }
    7611   }
    7612   else
    7613   {
    7614     /*Shdl=*/initSL(F, Q,strat); /*sets also S, ecartS, fromQ */
    7615     // /*Shdl=*/initS(F, Q,strat); /*sets also S, ecartS, fromQ */
     7617 
     7618    else
     7619    {
     7620      /*Shdl=*/initSL(F, Q,strat); /*sets also S, ecartS, fromQ */
     7621      // /*Shdl=*/initS(F, Q,strat); /*sets also S, ecartS, fromQ */
     7622    }
    76167623  }
    76177624  strat->fromT = FALSE;
    76187625  strat->noTailReduction = !TEST_OPT_REDTAIL;
    7619   if (!TEST_OPT_SB_1)
    7620   {
    7621     #ifdef HAVE_RINGS
    7622     if(!rField_is_Ring(currRing))
    7623     #endif
     7626  if ((!TEST_OPT_SB_1)
     7627  #ifdef HAVE_RINGS
     7628  || (rField_is_Ring(currRing))
     7629  #endif
     7630  )
     7631  {
    76247632    updateS(TRUE,strat);
    76257633  }
     
    77777785    if (strat->kNoether!=NULL) pSetComp(strat->kNoetherTail(), strat->ak);
    77787786  }
    7779   if(TEST_OPT_SB_1)
    7780   {
    7781     #ifdef HAVE_RINGS
    7782     if(!rField_is_Ring(currRing))
    7783     #endif
     7787  #ifdef HAVE_RINGS
     7788  if(rField_is_Ring(currRing))
     7789  {
     7790    /*Shdl=*/initSLSba(F, Q,strat); /*sets also S, ecartS, fromQ */
     7791  }
     7792  else
     7793  #endif
     7794  {
     7795    if(TEST_OPT_SB_1)
    77847796    {
    77857797        int i;
     
    77987810        idDelete(&P);
    77997811    }
    7800   }
    7801   else
    7802   {
    7803     /*Shdl=*/initSLSba(F, Q,strat); /*sets also S, ecartS, fromQ */
    7804     // /*Shdl=*/initS(F, Q,strat); /*sets also S, ecartS, fromQ */
     7812    else
     7813    {
     7814      /*Shdl=*/initSLSba(F, Q,strat); /*sets also S, ecartS, fromQ */
     7815      // /*Shdl=*/initS(F, Q,strat); /*sets also S, ecartS, fromQ */
     7816    }
    78057817  }
    78067818  strat->fromT = FALSE;
     
    90389050    if (strat->kNoether!=NULL) pSetComp(strat->kNoetherTail(), strat->ak);
    90399051  }
    9040   if(TEST_OPT_SB_1)
    9041   {
    9042     #ifdef HAVE_RINGS
    9043     if(!rField_is_Ring(currRing))
    9044     #endif
     9052  #ifdef HAVE_RINGS
     9053  if(rField_is_Ring(currRing))
     9054  {
     9055    /*Shdl=*/initSL(F, Q,strat); /*sets also S, ecartS, fromQ */
     9056  }
     9057  #endif
     9058  {
     9059    if(TEST_OPT_SB_1)
    90459060    {
    90469061        int i;
     
    90599074        idDelete(&P);
    90609075    }
    9061   }
    9062   else
    9063   {
    9064     /*Shdl=*/initSL(F, Q,strat); /*sets also S, ecartS, fromQ */
    9065     // /*Shdl=*/initS(F, Q,strat); /*sets also S, ecartS, fromQ */
     9076    else
     9077    {
     9078      /*Shdl=*/initSL(F, Q,strat); /*sets also S, ecartS, fromQ */
     9079      // /*Shdl=*/initS(F, Q,strat); /*sets also S, ecartS, fromQ */
     9080    }
    90669081  }
    90679082  strat->fromT = FALSE;
  • kernel/misc.cc

    rca4d699 reeb5b0c  
    1111#include <kernel/mod2.h>
    1212
    13 #define SI_DONT_HAVE_GLOBAL_VARS
    14 #  include <factory/factory.h>
     13#include <factory/factory.h>
    1514/* libfac version strings */
    1615
  • kernel/numeric/mpr_base.h

    rca4d699 reeb5b0c  
    1010*/
    1111
    12 #include <numeric/mpr_numeric.h>
     12#include "mpr_numeric.h"
    1313
    1414#define SNONE -1
  • kernel/syz0.cc

    rca4d699 reeb5b0c  
    772772}
    773773
     774#if 0
    774775static void syMergeSortResolventFB(resolvente res,int length, int initial=1)
    775776{
     
    826827  }
    827828}
     829#endif
    828830
    829831BOOLEAN syTestOrder(ideal M)
  • kernel/syz3.cc

    rca4d699 reeb5b0c  
    10701070    for (j=0;j<i;j++)
    10711071    {
    1072       if ((pGetComp(add_generators->m[j])==pGetComp(add_generators->m[i])))
     1072      if (pGetComp(add_generators->m[j]) == pGetComp(add_generators->m[i]))
    10731073      {
    10741074        p = pOne();
  • kernel/test.cc

    rca4d699 reeb5b0c  
    5050#include <polys/clapsing.h>
    5151
    52 
    53 // The following are needed due to FACTORY (e.g. initCanonicalForm)
    54 // int initializeGMP(){ return 1; }
    55 int mmInit(void) {return 1; }
    5652
    5753// // TODO: DUE to the use of HALT in npolygon.cc :(((
  • libpolys/Makefile.am

    rca4d699 reeb5b0c  
    33bin_SCRIPTS = libpolys-config
    44
    5 PACKAGES=misc reporter coeffs polys tests
    6 SUBDIRS=$(PACKAGES)
    7 
    8 TESTDIRS=coeffs tests
     5SUBDIRS=misc reporter coeffs polys tests
    96
    107configheaderdir = ${includedir}/singular
  • libpolys/coeffs/AE.cc

    rca4d699 reeb5b0c  
    4949
    5050//Standard - Addition
    51 int_poly int_poly::poly_add(const int_poly a, const int_poly b)
     51void int_poly::poly_add(const int_poly a, const int_poly b)
    5252{
    5353    if (a.deg >=b.deg)
     
    7878//Überschreibende Addition
    7979
    80 int_poly int_poly::poly_add_to(const int_poly g)
     80void int_poly::poly_add_to(const int_poly g)
    8181{
    8282    this->poly_add(*this,g);
     
    8484
    8585//Addition einer Konstanten
    86 int_poly int_poly::poly_add_const(int_poly f,const mpz_t a)
     86void int_poly::poly_add_const(int_poly f,const mpz_t a)
    8787{
    8888    if (f.is_zero()==1)
     
    102102//To Variante Addition einer Konstanten
    103103
    104 int_poly int_poly::poly_add_const_to(const mpz_t a)
     104void int_poly::poly_add_const_to(const mpz_t a)
    105105{
    106106    this->poly_add_const(*this,a);
     
    108108
    109109//Monom Addition
    110 int_poly int_poly::poly_add_mon(int_poly f, mpz_t a, int i)
     110void int_poly::poly_add_mon(int_poly f, mpz_t a, int i)
    111111{
    112112    poly_set(f);
     
    141141
    142142//To Variante Monomaddition
    143 int_poly int_poly::poly_add_mon_to(mpz_t a, int i)
     143void int_poly::poly_add_mon_to(mpz_t a, int i)
    144144{
    145145    if (i<=deg  && is_zero()==0)
     
    175175//Subtraktionen
    176176
    177 int_poly int_poly::poly_sub(const int_poly a, const int_poly b)
     177void int_poly::poly_sub(const int_poly a, const int_poly b)
    178178{
    179179    int_poly temp;
     
    193193//Überschreibende Subtraktion
    194194
    195 int_poly int_poly::poly_sub_to(const int_poly b)
     195void int_poly::poly_sub_to(const int_poly b)
    196196{
    197197    this->poly_sub(*this,b);
     
    199199
    200200//Subtraktion einer Konstanten
    201 int_poly int_poly::poly_sub_const(int_poly f,const mpz_t a)
     201void int_poly::poly_sub_const(int_poly f,const mpz_t a)
    202202{
    203203    if (f.is_zero()==1)
     
    222222//To Variante Subtraktion einer Konstanten
    223223
    224 int_poly int_poly::poly_sub_const_to(const mpz_t a)
     224void int_poly::poly_sub_const_to(const mpz_t a)
    225225{
    226226    this->poly_sub_const(*this,a);
     
    229229
    230230//Monom Subtraktion
    231 int_poly int_poly::poly_sub_mon(const int_poly f , mpz_t a, int i)
     231void int_poly::poly_sub_mon(const int_poly f , mpz_t a, int i)
    232232{
    233233    poly_set(f);
     
    261261
    262262//To Variante Monomaddition
    263 int_poly int_poly::poly_sub_mon_to(mpz_t a, int i)
     263void int_poly::poly_sub_mon_to(mpz_t a, int i)
    264264{
    265265
     
    295295
    296296//Multiplikation mit Monom
    297 int_poly int_poly::poly_mon_mult(const int_poly f, int n)
    298 {
    299     if (f,is_zero()==1)
     297void int_poly::poly_mon_mult(const int_poly f, int n)
     298{
     299    if (f.is_zero()==1)
    300300    {
    301301        poly_set_zero();
     
    315315}
    316316
    317 int_poly int_poly::poly_mon_mult_to(const int n)
     317void int_poly::poly_mon_mult_to(const int n)
    318318{
    319319    this->poly_mon_mult(*this,n);
     
    323323//Multiplikation mit Skalar
    324324
    325 int_poly int_poly::poly_scalar_mult(const int_poly g, const mpz_t n)
     325void int_poly::poly_scalar_mult(const int_poly g, const mpz_t n)
    326326{
    327327    if (mpz_sgn(n)==0)
     
    342342
    343343
    344 int_poly int_poly::poly_scalar_mult(const mpz_t n, const int_poly g)
     344void int_poly::poly_scalar_mult(const mpz_t n, const int_poly g)
    345345{
    346346    if (mpz_sgn(n)==0)
     
    360360
    361361
    362 int_poly int_poly::poly_scalar_mult_to(const mpz_t n)
     362void int_poly::poly_scalar_mult_to(const mpz_t n)
    363363{
    364364    this->poly_scalar_mult(*this,n);
     
    369369// Negation
    370370
    371 int_poly int_poly::poly_neg()
     371void int_poly::poly_neg()
    372372{
    373373    for (int i=0;i<=deg;i++)
     
    378378
    379379// Naive Multiplikation
    380 int_poly int_poly::poly_mult_n(int_poly a,int_poly b)
     380void int_poly::poly_mult_n(int_poly a,int_poly b)
    381381{
    382382
     
    422422//Überschreibende Multiplikation
    423423
    424 int_poly int_poly::poly_mult_n_to(const int_poly g)
     424void int_poly::poly_mult_n_to(const int_poly g)
    425425{
    426426    this->poly_mult_n(*this,g);
     
    429429
    430430// Karatsuba-Multiplikation (Weimerskirch/Paar Alg. 1), ACHTUNG VORLÄUFIGE VERSION, macht noch Fehler beim Grad und ist unelegant !!!
    431 int_poly int_poly::poly_mult_ka( int_poly A,  int_poly B)
     431void int_poly::poly_mult_ka( int_poly A,  int_poly B)
    432432{
    433433
     
    487487//Skalare Divisionen
    488488
    489 int_poly int_poly::poly_scalar_div( const int_poly g, const mpz_t n)
     489void int_poly::poly_scalar_div( const int_poly g, const mpz_t n)
    490490{
    491491    deg=g.deg;
     
    500500
    501501
    502 int_poly int_poly::poly_scalar_div_to(const mpz_t n)
     502void int_poly::poly_scalar_div_to(const mpz_t n)
    503503{
    504504    this->poly_scalar_div(*this,n);
     
    506506
    507507// Division durch Monom -  results in Quotient without remainder
    508 int_poly int_poly::poly_mon_div(const int_poly f, const int n)
     508void int_poly::poly_mon_div(const int_poly f, const int n)
    509509{
    510510    if (f.deg<n)
     
    523523
    524524// Division durch Monom - Rest
    525 int_poly int_poly::poly_mon_div_rem(const int_poly f, const int n)
     525void int_poly::poly_mon_div_rem(const int_poly f, const int n)
    526526{
    527527    if (f.deg<n)
     
    543543
    544544//Exakte Division nach Cohen 3.1.1 (works only if B!=0)
    545 int_poly int_poly::poly_div(int_poly &Q,int_poly &R, int_poly A,  int_poly B)
     545void int_poly::poly_div(int_poly &Q,int_poly &R, int_poly A,  int_poly B)
    546546{
    547547    if (B.is_zero()==0)
     
    574574//To Varainte der exakten Division
    575575
    576 int_poly int_poly::poly_div_to(int_poly &Q,int_poly &R,const int_poly B)
     576void int_poly::poly_div_to(int_poly &Q,int_poly &R,const int_poly B)
    577577{
    578578    this->poly_div( Q, R,*this,B);
     
    581581// pseudo Division nach Cohen 3.1.2 (geht eleganter)
    582582
    583 int_poly int_poly::poly_pseudodiv_rem( int_poly A,  int_poly B)
     583void int_poly::poly_pseudodiv_rem( int_poly A,  int_poly B)
    584584{
    585585
     
    610610//To Variante Algo 3.1.2 nach Cohen
    611611
    612 int_poly int_poly::poly_pseudodiv_rem_to(const int_poly B)
     612void int_poly::poly_pseudodiv_rem_to(const int_poly B)
    613613{
    614614    this->poly_pseudodiv_rem(*this,B);
     
    619619//berechnet und entsprechendes in Q und R hineinschreibt
    620620
    621 int_poly int_poly::poly_pseudodiv(int_poly &Q, int_poly &R, int_poly A,  int_poly B)
     621void int_poly::poly_pseudodiv(int_poly &Q, int_poly &R, int_poly A,  int_poly B)
    622622{
    623623
     
    678678//To Variante Algo 3.1.2 nach Cohen
    679679
    680 int_poly int_poly::poly_pseudodiv_to(int_poly &Q, int_poly &R, int_poly B)
     680void int_poly::poly_pseudodiv_to(int_poly &Q, int_poly &R, int_poly B)
    681681{
    682682    this->poly_pseudodiv(Q, R,*this,B);
     
    686686
    687687// a := a*b + c
    688 int_poly int_poly::poly_multadd_to(const int_poly b, const int_poly c)
     688void int_poly::poly_multadd_to(const int_poly b, const int_poly c)
    689689{
    690690    poly_mult_n_to(b);
     
    693693
    694694//a=a*b-c
    695 int_poly int_poly::poly_multsub_to(const int_poly b, const int_poly c)
     695void int_poly::poly_multsub_to(const int_poly b, const int_poly c)
    696696{
    697697    poly_mult_n_to(b);
     
    703703/*
    704704// a := (a+b)* c
    705 int_poly int_poly::poly_addmult_to(const int_poly b, const int_poly c)
     705void int_poly::poly_addmult_to(const int_poly b, const int_poly c)
    706706{
    707707        int_poly a(deg,coef);
     
    741741
    742742
    743 int_poly int_poly::poly_pp(int_poly f)
     743void int_poly::poly_pp(int_poly f)
    744744{
    745745    mpz_t cont;
     
    791791
    792792//setze int_polynom auf int_polynom b
    793 int_poly int_poly::poly_set(const int_poly b)
     793void int_poly::poly_set(const int_poly b)
    794794{
    795795    deg=b.deg;
     
    802802
    803803// setze int_polynom auf konstantes int_polynom b
    804 int_poly int_poly::poly_set(const mpz_t b)
     804void int_poly::poly_set(const mpz_t b)
    805805{
    806806    deg=0;
     
    810810
    811811//setze int_polynom auf Nullint_polynom
    812 int_poly int_poly::poly_set_zero()
     812void int_poly::poly_set_zero()
    813813{
    814814    deg = -1;
     
    818818//Vergleiche ob 2 int_polynome gleich return 1 falls ja sont 0
    819819
    820 int int_poly::is_equal(const int_poly g)
     820int int_poly::is_equal(const int_poly g) const
    821821{
    822822    if (deg!=g.deg)
     
    834834//ÜberprÃŒft ob das int_polynom 0 ist
    835835
    836 int int_poly::is_zero()
     836int int_poly::is_zero() const
    837837{
    838838    if (deg<0)
     
    843843}
    844844
    845 int int_poly::is_one()
     845int int_poly::is_one() const
    846846{
    847847    if (deg==0)
     
    853853}
    854854
    855 int int_poly::is_monic()
     855int int_poly::is_monic() const
    856856{
    857857    if (mpz_cmpabs_ui(coef[deg],1)==0)
     
    863863// klassischer GGT nach Cohen 3.2.1
    864864
    865 int_poly int_poly::poly_gcd( int_poly A,  int_poly B)
     865void int_poly::poly_gcd( int_poly A,  int_poly B)
    866866{
    867867    if (A.deg<B.deg)
     
    898898
    899899
    900 int_poly int_poly::poly_ppgcd(int_poly A,int_poly B)
     900void int_poly::poly_ppgcd(int_poly A,int_poly B)
    901901{
    902902    if(A.deg<B.deg)
     
    956956
    957957
    958 int_poly int_poly::poly_ppgcd_to(int_poly B)
     958void int_poly::poly_ppgcd_to(int_poly B)
    959959{
    960960    this->poly_ppgcd(*this,B);
     
    965965// GGT nach Cohen, Algorithmus 3.3.1 (Subresultant int_polynomial GCD) TO DO: Optimierung bzgl. Mehrfachberechnung)
    966966// Bpp ist das B in den Schritten ab 2
    967 int_poly int_poly::poly_subgcd(int_poly A, int_poly B)
     967void int_poly::poly_subgcd(int_poly A, int_poly B)
    968968{
    969969    //Initialisierung und Reduktionen
     
    10501050// To Varianta Subresultanten
    10511051
    1052 int_poly int_poly::poly_subgcd_to(int_poly B)
     1052void int_poly::poly_subgcd_to(int_poly B)
    10531053{
    10541054    this->poly_subgcd(*this,B);
     
    10581058//Extended Subresultant GCD; see Kaplan, M. Computeralgebra, chapter 4.6
    10591059//returns g=r*A+t*B IT WORKS DONT TOUCH IT!!!!!!!!
    1060 int_poly int_poly::poly_extsubgcd(int_poly& r, int_poly& t,int_poly &g,int_poly A,int_poly B)
     1060void int_poly::poly_extsubgcd(int_poly& r, int_poly& t,int_poly &g,int_poly A,int_poly B)
    10611061{
    10621062    if (A.deg<B.deg)
  • libpolys/coeffs/AE.h

    rca4d699 reeb5b0c  
    3030    // Additionen
    3131
    32     int_poly poly_add(const int_poly , const int_poly );
    33     int_poly poly_add_to(const int_poly);
    34     int_poly poly_add_mon(const int_poly,mpz_t, int); //addiert Monome zu int_polynom
    35     int_poly poly_add_mon_to(mpz_t,int);
    36     int_poly poly_add_const( int_poly, const mpz_t);
    37     int_poly poly_add_const_to(const mpz_t);
     32    void poly_add(const int_poly , const int_poly );
     33    void poly_add_to(const int_poly);
     34    void poly_add_mon(const int_poly,mpz_t, int); //addiert Monome zu int_polynom
     35    void poly_add_mon_to(mpz_t,int);
     36    void poly_add_const( int_poly, const mpz_t);
     37    void poly_add_const_to(const mpz_t);
    3838
    3939    // Subtraktion
    4040
    41     int_poly poly_sub(const int_poly , const int_poly );
    42     int_poly poly_sub_to(const int_poly);
    43     int_poly poly_sub_mon(const int_poly,mpz_t,int);
    44     int_poly poly_sub_mon_to(mpz_t,int);
    45     int_poly poly_sub_const( int_poly, const mpz_t);
    46     int_poly poly_sub_const_to(const mpz_t);
     41    void poly_sub(const int_poly , const int_poly );
     42    void poly_sub_to(const int_poly);
     43    void poly_sub_mon(const int_poly,mpz_t,int);
     44    void poly_sub_mon_to(mpz_t,int);
     45    void poly_sub_const( int_poly, const mpz_t);
     46    void poly_sub_const_to(const mpz_t);
    4747
    4848    //Multiplikationen
    4949
    50     int_poly poly_mult_n(int_poly,int_poly);
    51     int_poly poly_mult_n_to(const int_poly);
    52     int_poly poly_mult_ka( int_poly,  int_poly);
    53     int_poly poly_scalar_mult(const mpz_t ,const int_poly);
    54     int_poly poly_scalar_mult(const int_poly, const mpz_t);
    55     int_poly poly_scalar_mult_to(const mpz_t);
    56     int_poly poly_neg();
    57     int_poly poly_mon_mult(const int_poly, const int);
    58     int_poly poly_mon_mult_to(const int);
     50    void poly_mult_n(int_poly,int_poly);
     51    void poly_mult_n_to(const int_poly);
     52    void poly_mult_ka( int_poly,  int_poly);
     53    void poly_scalar_mult(const mpz_t ,const int_poly);
     54    void poly_scalar_mult(const int_poly, const mpz_t);
     55    void poly_scalar_mult_to(const mpz_t);
     56    void poly_neg();
     57    void poly_mon_mult(const int_poly, const int);
     58    void poly_mon_mult_to(const int);
    5959
    6060    //Divisionen
    61     int_poly poly_div(int_poly &,int_poly &, int_poly,  int_poly); // exakte Division
    62     int_poly poly_div_to(int_poly &,int_poly &,const int_poly);       // To Variante exakte Division
    63     int_poly poly_pseudodiv(int_poly &, int_poly &, int_poly ,  int_poly );
    64     int_poly poly_pseudodiv_to(int_poly &, int_poly &, int_poly );
    65     int_poly poly_pseudodiv_rem( int_poly , int_poly);
    66     int_poly poly_pseudodiv_rem_to(const int_poly);
    67     int_poly poly_scalar_div(const int_poly, const mpz_t);
    68     int_poly poly_scalar_div_to(const mpz_t);
    69     int_poly poly_mon_div(const int_poly, const int);
    70     int_poly poly_mon_div_rem(const int_poly, const int);
     61    void poly_div(int_poly &,int_poly &, int_poly,  int_poly); // exakte Division
     62    void poly_div_to(int_poly &,int_poly &,const int_poly);       // To Variante exakte Division
     63    void poly_pseudodiv(int_poly &, int_poly &, int_poly ,  int_poly );
     64    void poly_pseudodiv_to(int_poly &, int_poly &, int_poly );
     65    void poly_pseudodiv_rem( int_poly , int_poly);
     66    void poly_pseudodiv_rem_to(const int_poly);
     67    void poly_scalar_div(const int_poly, const mpz_t);
     68    void poly_scalar_div_to(const mpz_t);
     69    void poly_mon_div(const int_poly, const int);
     70    void poly_mon_div_rem(const int_poly, const int);
    7171
    7272    //Kombinationen
    7373
    74     int_poly poly_multadd_to(const int_poly, const int_poly); //a=a*b+c
    75     int_poly poly_multsub_to(const int_poly,const int_poly);  //a=a*b-c
     74    void poly_multadd_to(const int_poly, const int_poly); //a=a*b+c
     75    void poly_multsub_to(const int_poly,const int_poly);  //a=a*b-c
    7676    //int_poly poly_addmult_to(const int_poly, const int_poly);
    7777
     
    8080    // Content & Primitive Part
    8181    void poly_cont(mpz_t&);
    82     int_poly poly_pp(int_poly);
     82    void poly_pp(int_poly);
    8383
    8484
    8585    // Sonstige Operationen
    86     int_poly poly_set(const int_poly);
    87     int_poly poly_set(const mpz_t);                // Setzt int_polynom auf Konstante
    88     int_poly poly_set_zero();                        // Setzt int_polynom auf 0
     86    void poly_set(const int_poly);
     87    void poly_set(const mpz_t);                // Setzt int_polynom auf Konstante
     88    void poly_set_zero();                        // Setzt int_polynom auf 0
    8989    void poly_horner(mpz_t, const mpz_t);        // Wertet int_polynom mittels Horner-Schema an einer Stelle aus
    9090    void poly_horner_int_poly(int_poly, const int_poly);        //Setzt int_polynom in int_polynom mittels Horner Schema ein
    91     int_poly poly_gcd(int_poly,int_poly);                //Standard GGT
    92     int_poly poly_extgcd(int_poly,int_poly,int_poly,int_poly);        //Erweiterter Standard GGT
    93     int_poly poly_ppgcd( int_poly, int_poly);                // Primitive int_polynomial GCD
    94     int_poly poly_ppgcd_to(int_poly);
    95     int_poly poly_subgcd( int_poly, int_poly);                // Subresulatant GCD
    96     int_poly poly_subgcd_to(int_poly);
    97     int_poly poly_extsubgcd(int_poly&, int_poly&,int_poly &,int_poly,int_poly);
    98     int is_equal(const int_poly);                // Test auf Gleichheit
    99     int is_zero();                                // Test auf Gleichheit mit 0
    100     int is_one();                                // Test auf Gleichheit mit 1
    101     int is_monic();                                // testet, ob das int_polynom normiert ist
     91    void poly_gcd(int_poly,int_poly);                //Standard GGT
     92    void poly_extgcd(int_poly,int_poly,int_poly,int_poly);        //Erweiterter Standard GGT
     93    void poly_ppgcd( int_poly, int_poly);                // Primitive int_polynomial GCD
     94    void poly_ppgcd_to(int_poly);
     95    void poly_subgcd( int_poly, int_poly);                // Subresulatant GCD
     96    void poly_subgcd_to(int_poly);
     97    void poly_extsubgcd(int_poly&, int_poly&,int_poly &,int_poly,int_poly);
     98    int is_equal(const int_poly) const;                // Test auf Gleichheit
     99    int is_zero() const;                                // Test auf Gleichheit mit 0
     100    int is_one() const;                                // Test auf Gleichheit mit 1
     101    int is_monic() const;                                // testet, ob das int_polynom normiert ist
    102102
    103103
  • libpolys/coeffs/AEQ.cc

    rca4d699 reeb5b0c  
    4242
    4343// KÃŒrzen  --  MACHT NOCH MIST!
    44 Q_poly Q_poly::Q_poly_reduce()
     44void Q_poly::Q_poly_reduce()
    4545{
    4646    if (is_zero()==1)
     
    7979
    8080// Koeffizienten mit b erweitern
    81 Q_poly Q_poly::Q_poly_extend(mpz_t b)
     81void Q_poly::Q_poly_extend(mpz_t b)
    8282{
    8383        mpz_mul(denom,denom,b);
     
    9595
    9696//Standard - Addition
    97 Q_poly Q_poly::Q_poly_add(const Q_poly a, const Q_poly b)
     97void Q_poly::Q_poly_add(const Q_poly a, const Q_poly b)
    9898{
    9999    if (a.deg >= b.deg)
     
    129129//Überschreibende Addition
    130130
    131 Q_poly Q_poly::Q_poly_add_to(const Q_poly g)
     131void Q_poly::Q_poly_add_to(const Q_poly g)
    132132{
    133133    this->Q_poly_add(*this,g);
     
    135135
    136136//Addition einer Konstanten
    137 Q_poly Q_poly::Q_poly_add_const(Q_poly f, const mpz_t a)
     137void Q_poly::Q_poly_add_const(Q_poly f, const mpz_t a)
    138138{
    139139    if (f.is_zero()==1)
     
    156156//To Variante Addition einer Konstanten
    157157
    158 Q_poly Q_poly::Q_poly_add_const_to(const mpz_t a)
     158void Q_poly::Q_poly_add_const_to(const mpz_t a)
    159159{
    160160    this->Q_poly_add_const(*this,a);
     
    162162
    163163//Monom Addition
    164 Q_poly Q_poly::Q_poly_add_mon(const Q_poly f, mpz_t a, int i)
     164void Q_poly::Q_poly_add_mon(const Q_poly f, mpz_t a, int i)
    165165{
    166166    Q_poly_set(f);
     
    201201
    202202//To Variante Monomaddition
    203 Q_poly Q_poly::Q_poly_add_mon_to(mpz_t a, int i)
     203void Q_poly::Q_poly_add_mon_to(mpz_t a, int i)
    204204{
    205205    this->Q_poly_add_mon(*this,a,i);
     
    208208//Subtraktionen
    209209
    210 Q_poly Q_poly::Q_poly_sub(const Q_poly a, const Q_poly b)
     210void Q_poly::Q_poly_sub(const Q_poly a, const Q_poly b)
    211211{
    212212    Q_poly temp;
     
    219219//Überschreibende Subtraktion
    220220
    221 Q_poly Q_poly::Q_poly_sub_to(const Q_poly b)
     221void Q_poly::Q_poly_sub_to(const Q_poly b)
    222222{
    223223    this->Q_poly_sub(*this,b);
     
    225225
    226226//Subtraktion einer Konstanten
    227 Q_poly Q_poly::Q_poly_sub_const(Q_poly f,const mpz_t a)
     227void Q_poly::Q_poly_sub_const(Q_poly f,const mpz_t a)
    228228{
    229229    if (f.is_zero()==1)
     
    245245//To Variante Subtraktion einer Konstanten
    246246
    247 Q_poly Q_poly::Q_poly_sub_const_to(const mpz_t a)
     247void Q_poly::Q_poly_sub_const_to(const mpz_t a)
    248248{
    249249    this->Q_poly_sub_const(*this,a);
     
    252252
    253253//Monom Subtraktion
    254 Q_poly Q_poly::Q_poly_sub_mon(const Q_poly f , mpz_t a, int i)
     254void Q_poly::Q_poly_sub_mon(const Q_poly f , mpz_t a, int i)
    255255{
    256256    mpz_t temp;
     
    261261
    262262//To Variante Monomsubtraktion
    263 Q_poly Q_poly::Q_poly_sub_mon_to(mpz_t a, int i)
     263void Q_poly::Q_poly_sub_mon_to(mpz_t a, int i)
    264264{
    265265    this->Q_poly_sub_mon(*this,a,i);
     
    270270
    271271//Multiplikation mit Monom
    272 Q_poly Q_poly::Q_poly_mon_mult(const Q_poly f, int n)
     272void Q_poly::Q_poly_mon_mult(const Q_poly f, int n)
    273273{
    274274    deg=f.deg+n;
     
    284284}
    285285
    286 Q_poly Q_poly::Q_poly_mon_mult_to(const int n)
     286void Q_poly::Q_poly_mon_mult_to(const int n)
    287287{
    288288    this->Q_poly_mon_mult(*this,n);
     
    292292//Multiplikation mit Skalar
    293293
    294 Q_poly Q_poly::Q_poly_scalar_mult(const Q_poly g, const mpz_t n)
     294void Q_poly::Q_poly_scalar_mult(const Q_poly g, const mpz_t n)
    295295{
    296296    deg=g.deg;
     
    308308
    309309
    310 Q_poly Q_poly::Q_poly_scalar_mult(const mpz_t n, const Q_poly g)
     310void Q_poly::Q_poly_scalar_mult(const mpz_t n, const Q_poly g)
    311311{
    312312    deg=g.deg;
     
    323323
    324324
    325 Q_poly Q_poly::Q_poly_scalar_mult_to(const mpz_t n)
     325void Q_poly::Q_poly_scalar_mult_to(const mpz_t n)
    326326{
    327327    this->Q_poly_scalar_mult(*this,n);
     
    332332// Negation
    333333
    334 Q_poly Q_poly::Q_poly_neg()
     334void Q_poly::Q_poly_neg()
    335335{
    336336    mpz_neg(denom,denom);
     
    338338
    339339// Naive Multiplikation
    340 Q_poly Q_poly::Q_poly_mult_n(Q_poly a,Q_poly b)
     340void Q_poly::Q_poly_mult_n(Q_poly a,Q_poly b)
    341341{
    342342
     
    380380//Überschreibende Multiplikation
    381381
    382 Q_poly Q_poly::Q_poly_mult_n_to(const Q_poly g)
     382void Q_poly::Q_poly_mult_n_to(const Q_poly g)
    383383{
    384384    this->Q_poly_mult_n(*this,g);
     
    386386
    387387// Karatsuba-Multiplikation (Weimerskirch/Paar Alg. 1), ACHTUNG VORLÄUFIGE VERSION, macht noch Fehler beim Grad und ist unelegant !!!
    388 Q_poly Q_poly::Q_poly_mult_ka(const Q_poly A, const Q_poly B)
     388void Q_poly::Q_poly_mult_ka(const Q_poly A, const Q_poly B)
    389389{
    390390    // Größeren Grad feststellen
     
    436436//Skalare Divisionen
    437437
    438 Q_poly Q_poly::Q_poly_scalar_div(const Q_poly g, const mpz_t n)
     438void Q_poly::Q_poly_scalar_div(const Q_poly g, const mpz_t n)
    439439{
    440440    if (mpz_sgn(n)!=0) // ÃŒberprÃŒft Teilung durch 0
     
    446446
    447447
    448 Q_poly Q_poly::Q_poly_scalar_div_to(const mpz_t n)
     448void Q_poly::Q_poly_scalar_div_to(const mpz_t n)
    449449{
    450450    this->Q_poly_scalar_div(*this,n);
     
    452452
    453453// Division durch Monom - Quotient
    454 Q_poly Q_poly::Q_poly_mon_div(const Q_poly f, const int n)
     454void Q_poly::Q_poly_mon_div(const Q_poly f, const int n)
    455455{
    456456    if (f.deg<n)
     
    471471
    472472// Division durch Monom - Rest
    473 Q_poly Q_poly::Q_poly_mon_div_rem(const Q_poly f, const int n)
     473void Q_poly::Q_poly_mon_div_rem(const Q_poly f, const int n)
    474474{
    475475    if (f.deg<n)
     
    501501// Euklidische Division nach Cohen Algo 3.1.1 (degA muss größer gleich deg B sein)!!
    502502
    503 Q_poly Q_poly::Q_poly_div_rem(const Q_poly A, const Q_poly B)
     503void Q_poly::Q_poly_div_rem(const Q_poly A, const Q_poly B)
    504504{
    505505
     
    549549//To Variante von Algo 3.1.1 im Cohen
    550550
    551 Q_poly Q_poly::Q_poly_div_rem_to(const Q_poly B)
     551void Q_poly::Q_poly_div_rem_to(const Q_poly B)
    552552{
    553553    this->Q_poly_div_rem(*this,B);
     
    556556
    557557// Division nach Cohen 3.1.2 (gibt R und Q aus) --> FÃŒhrt Pseudo-Division durch, korrigiert den Faktor aber im Nenner
    558 Q_poly Q_poly::Q_poly_div(Q_poly &Q, Q_poly &R, const Q_poly A, const Q_poly B)
     558void Q_poly::Q_poly_div(Q_poly &Q, Q_poly &R, const Q_poly A, const Q_poly B)
    559559{
    560560
     
    613613//To Variante der exakten Division
    614614
    615 Q_poly Q_poly::Q_poly_div_to(Q_poly &Q,Q_poly &R,const Q_poly B)
     615void Q_poly::Q_poly_div_to(Q_poly &Q,Q_poly &R,const Q_poly B)
    616616{
    617617    this->Q_poly_div(Q,R,*this,B);
     
    622622
    623623// a := a*b + c
    624 Q_poly Q_poly::Q_poly_multadd_to(const Q_poly b, const Q_poly c)
     624void Q_poly::Q_poly_multadd_to(const Q_poly b, const Q_poly c)
    625625{
    626626    Q_poly_mult_n_to(b);
     
    629629
    630630//a=a*b-c
    631 Q_poly Q_poly::Q_poly_multsub_to(const Q_poly b, const Q_poly c)
     631void Q_poly::Q_poly_multsub_to(const Q_poly b, const Q_poly c)
    632632{
    633633    Q_poly_mult_n_to(b);
     
    639639/*
    640640// a := (a+b)* c
    641 Q_poly Q_poly::poly_addmult_to(const Q_poly b, const Q_poly c)
     641void Q_poly::poly_addmult_to(const Q_poly b, const Q_poly c)
    642642{
    643643        Q_poly a(deg,coef);
     
    685685
    686686//setze Q_polynom auf Q_polynom b
    687 Q_poly Q_poly::Q_poly_set(const Q_poly b)
     687void Q_poly::Q_poly_set(const Q_poly b)
    688688{
    689689    deg=b.deg;
     
    698698
    699699// setze Q_polynom auf konstantes Q_polynom b/d
    700 Q_poly Q_poly::Q_poly_set(const mpz_t b, const mpz_t d)
     700void Q_poly::Q_poly_set(const mpz_t b, const mpz_t d)
    701701{
    702702    deg=0;
     
    706706
    707707// setze Q_polynom auf konstantes Z_polynom b
    708 Q_poly Q_poly::Q_poly_set(const mpz_t b)
     708void Q_poly::Q_poly_set(const mpz_t b)
    709709{
    710710    deg=0;
     
    715715
    716716//setze Q_polynom auf Nullpolynom
    717 Q_poly Q_poly::Q_poly_set_zero()
     717void Q_poly::Q_poly_set_zero()
    718718{
    719719    deg = -1;
     
    743743
    744744//ÜberprÃŒft ob das Q_polynom 0 ist
    745 int Q_poly::is_zero()
     745int Q_poly::is_zero() const
    746746{
    747747    if (deg<0)
     
    754754
    755755//ÜberprÃŒft ob das Q_polynom 1 ist
    756 int Q_poly::is_one()
     756int Q_poly::is_one() const
    757757{
    758758    if (deg==0)
     
    764764}
    765765
    766 int Q_poly::is_monic()
     766int Q_poly::is_monic() const
    767767{
    768768    if (mpz_cmp(coef[deg],denom)==0)
     
    774774// klassischer GGT nach Cohen 3.2.1
    775775
    776 Q_poly Q_poly::Q_poly_gcd(Q_poly A, Q_poly B)
     776void Q_poly::Q_poly_gcd(Q_poly A, Q_poly B)
    777777{
    778778
     
    805805// Nach nach Fieker 2.12 Symbolisches Rechnen (2012) MACHT PROBLEME
    806806// gibt g=s*A+t*B aus
    807 Q_poly Q_poly::Q_poly_extgcd(Q_poly &s,Q_poly &t,Q_poly &g, Q_poly A, Q_poly B)
     807void Q_poly::Q_poly_extgcd(Q_poly &s,Q_poly &t,Q_poly &g, Q_poly A, Q_poly B)
    808808{
    809809    if (A.deg<B.deg)
  • libpolys/coeffs/AEQ.h

    rca4d699 reeb5b0c  
    2626
    2727    //Reduktion modulo p
    28     Q_poly Q_poly_reduce();
    29     Q_poly Q_poly_extend(mpz_t);
     28    void Q_poly_reduce();
     29    void Q_poly_extend(mpz_t);
    3030
    3131    // Arithmetische Operationen
     
    3434    // Additionen
    3535
    36     Q_poly Q_poly_add(const Q_poly , const Q_poly );
    37     Q_poly Q_poly_add_to(const Q_poly);
    38     Q_poly Q_poly_add_mon(const Q_poly,mpz_t, int); //addiert Monome zu Q_polynom
    39     Q_poly Q_poly_add_mon_to(mpz_t,int);
    40     Q_poly Q_poly_add_const( Q_poly, const mpz_t);
    41     Q_poly Q_poly_add_const_to(const mpz_t);
     36    void Q_poly_add(const Q_poly , const Q_poly );
     37    void Q_poly_add_to(const Q_poly);
     38    void Q_poly_add_mon(const Q_poly,mpz_t, int); //addiert Monome zu Q_polynom
     39    void Q_poly_add_mon_to(mpz_t,int);
     40    void Q_poly_add_const( Q_poly, const mpz_t);
     41    void Q_poly_add_const_to(const mpz_t);
    4242
    4343    // Subtraktion
    4444
    45     Q_poly Q_poly_sub(const Q_poly , const Q_poly );
    46     Q_poly Q_poly_sub_to(const Q_poly);
    47     Q_poly Q_poly_sub_mon(const Q_poly,mpz_t,int);
    48     Q_poly Q_poly_sub_mon_to(mpz_t,int);
    49     Q_poly Q_poly_sub_const( Q_poly, const mpz_t);
    50     Q_poly Q_poly_sub_const_to(const mpz_t);
     45    void Q_poly_sub(const Q_poly , const Q_poly );
     46    void Q_poly_sub_to(const Q_poly);
     47    void Q_poly_sub_mon(const Q_poly,mpz_t,int);
     48    void Q_poly_sub_mon_to(mpz_t,int);
     49    void Q_poly_sub_const( Q_poly, const mpz_t);
     50    void Q_poly_sub_const_to(const mpz_t);
    5151
    5252    //Multiplikationen
    5353
    54     Q_poly Q_poly_mult_n(Q_poly,Q_poly);
    55     Q_poly Q_poly_mult_n_to(const Q_poly);
    56     Q_poly Q_poly_mult_ka(const Q_poly, const Q_poly);
    57     Q_poly Q_poly_scalar_mult(const mpz_t ,const Q_poly);
    58     Q_poly Q_poly_scalar_mult(const Q_poly, const mpz_t);
    59     Q_poly Q_poly_scalar_mult_to(const mpz_t);
    60     Q_poly Q_poly_neg();
    61     Q_poly Q_poly_mon_mult(const Q_poly, const int);
    62     Q_poly Q_poly_mon_mult_to(const int);
     54    void Q_poly_mult_n(Q_poly,Q_poly);
     55    void Q_poly_mult_n_to(const Q_poly);
     56    void Q_poly_mult_ka(const Q_poly, const Q_poly);
     57    void Q_poly_scalar_mult(const mpz_t ,const Q_poly);
     58    void Q_poly_scalar_mult(const Q_poly, const mpz_t);
     59    void Q_poly_scalar_mult_to(const mpz_t);
     60    void Q_poly_neg();
     61    void Q_poly_mon_mult(const Q_poly, const int);
     62    void Q_poly_mon_mult_to(const int);
    6363
    6464    //Divisionen
    65     Q_poly Q_poly_div(Q_poly&, Q_poly&,const Q_poly, const Q_poly);        // exakte Division
    66     Q_poly Q_poly_div_to(Q_poly&, Q_poly&,const Q_poly);                       // To Variante exakte Division
    67     Q_poly Q_poly_scalar_div(const Q_poly, const mpz_t); // Dividiert Polynom durch ganze Zahl
    68     Q_poly Q_poly_scalar_div_to(const mpz_t);
    69     Q_poly Q_poly_div_rem(const Q_poly, const Q_poly);        //Division mit Rest
    70     Q_poly Q_poly_div_rem_to(const Q_poly);
    71     Q_poly Q_poly_mon_div(const Q_poly, const int);        //Division durch Monom
    72     Q_poly Q_poly_mon_div_rem(const Q_poly, const int);
     65    void Q_poly_div(Q_poly&, Q_poly&,const Q_poly, const Q_poly);        // exakte Division
     66    void Q_poly_div_to(Q_poly&, Q_poly&,const Q_poly);                       // To Variante exakte Division
     67    void Q_poly_scalar_div(const Q_poly, const mpz_t); // Dividiert Polynom durch ganze Zahl
     68    void Q_poly_scalar_div_to(const mpz_t);
     69    void Q_poly_div_rem(const Q_poly, const Q_poly);        //Division mit Rest
     70    void Q_poly_div_rem_to(const Q_poly);
     71    void Q_poly_mon_div(const Q_poly, const int);        //Division durch Monom
     72    void Q_poly_mon_div_rem(const Q_poly, const int);
    7373
    7474    //Kombinationen
    7575
    76     Q_poly Q_poly_multadd_to(const Q_poly, const Q_poly); //a=a*b+c
    77     Q_poly Q_poly_multsub_to(const Q_poly,const Q_poly);  //a=a*b-c
     76    void Q_poly_multadd_to(const Q_poly, const Q_poly); //a=a*b+c
     77    void Q_poly_multsub_to(const Q_poly,const Q_poly);  //a=a*b-c
    7878    //Q_poly Q_poly_addmult_to(const Q_poly, const Q_poly);
    7979
     
    8282
    8383    // Sonstige Operationen
    84     Q_poly Q_poly_set(const Q_poly);
    85     Q_poly Q_poly_set(const mpz_t);                        // Setzt Q_polynom auf Konstante aus Z
    86     Q_poly Q_poly_set(const mpz_t, const mpz_t);        // Setzt Q_polynom auf Konstante aus Q
    87     Q_poly Q_poly_set_zero();                                // Setzt Q_polynom auf 0
     84    void Q_poly_set(const Q_poly);
     85    void Q_poly_set(const mpz_t);                        // Setzt Q_polynom auf Konstante aus Z
     86    void Q_poly_set(const mpz_t, const mpz_t);        // Setzt Q_polynom auf Konstante aus Q
     87    void Q_poly_set_zero();                                // Setzt Q_polynom auf 0
    8888    void Q_poly_horner(mpz_t, const mpz_t);                // Wertet Q_polynom mittels Horner-Schema an einer Stelle aus
    8989    void Q_poly_horner_Q_poly(Q_poly, const Q_poly);        //Setzt Q_polynom in Q_polynom mittels Horner Schema ein
    90     Q_poly Q_poly_gcd(Q_poly,Q_poly);                //Standard GGT
    91     Q_poly Q_poly_extgcd(Q_poly &,Q_poly &,Q_poly &, Q_poly, Q_poly);        //Erweiterter Standard GGT
     90    void Q_poly_gcd(Q_poly,Q_poly);                //Standard GGT
     91    void Q_poly_extgcd(Q_poly &,Q_poly &,Q_poly &, Q_poly, Q_poly);        //Erweiterter Standard GGT
    9292    int is_equal(Q_poly &);                        // Test auf Gleichheit
    93     int is_zero();                                // Test auf Gleichheit mit 0
    94     int is_one();                                // Test auf Gleichheit mit 1
    95     int is_monic();                                // testet, ob das Q_polynom normiert ist
     93    int is_zero() const;                                // Test auf Gleichheit mit 0
     94    int is_one() const;                                // Test auf Gleichheit mit 1
     95    int is_monic() const;                                // testet, ob das Q_polynom normiert ist
    9696
    9797    // Ein und Ausgabe
  • libpolys/coeffs/AEp.cc

    rca4d699 reeb5b0c  
    4747//Reduktion modulo p
    4848
    49 p_poly p_poly::p_poly_reduce(p_poly f,int p)
     49void p_poly::p_poly_reduce(p_poly f,int p)
    5050{
    5151    if (f.is_zero()==0)
     
    7070
    7171//Standard - Addition
    72 p_poly p_poly::p_poly_add(const p_poly a, const p_poly b)
     72void p_poly::p_poly_add(const p_poly a, const p_poly b)
    7373{
    7474    if (a.deg >=b.deg)
     
    102102//Überschreibende Addition
    103103
    104 p_poly p_poly::p_poly_add_to(const p_poly g)
     104void p_poly::p_poly_add_to(const p_poly g)
    105105{
    106106    this->p_poly_add(*this,g);
     
    108108
    109109//Addition einer Konstanten
    110 p_poly p_poly::p_poly_add_const(p_poly f,const mpz_t a)
     110void p_poly::p_poly_add_const(p_poly f,const mpz_t a)
    111111{
    112112    if (f.is_zero()==1 && mpz_divisible_ui_p(a,f.mod)==0)
     
    129129//To Variante Addition einer Konstanten
    130130
    131 p_poly p_poly::p_poly_add_const_to(const mpz_t a)
     131void p_poly::p_poly_add_const_to(const mpz_t a)
    132132{
    133133    this->p_poly_add_const(*this,a);
     
    135135
    136136//Monom Addition
    137 p_poly p_poly::p_poly_add_mon(const p_poly f, mpz_t a, int i)
     137void p_poly::p_poly_add_mon(const p_poly f, mpz_t a, int i)
    138138{
    139139    p_poly_set(f);
     
    177177
    178178//To Variante Monomaddition
    179 p_poly p_poly::p_poly_add_mon_to(mpz_t a, int i)
     179void p_poly::p_poly_add_mon_to(mpz_t a, int i)
    180180{
    181181
     
    218218//Subtraktionen
    219219
    220 p_poly p_poly::p_poly_sub(const p_poly a, const p_poly b)
     220void p_poly::p_poly_sub(const p_poly a, const p_poly b)
    221221{
    222222    if (a.deg >=b.deg)
     
    250250//Überschreibende Subtraktion
    251251
    252 p_poly p_poly::p_poly_sub_to(const p_poly b)
     252void p_poly::p_poly_sub_to(const p_poly b)
    253253{
    254254    this->p_poly_sub(*this,b);
     
    256256
    257257//Subtraktion einer Konstanten
    258 p_poly p_poly::p_poly_sub_const(p_poly f,const mpz_t a)
     258void p_poly::p_poly_sub_const(p_poly f,const mpz_t a)
    259259{
    260260    if (f.is_zero()==1)
     
    278278//To Variante Subtraktion einer Konstanten
    279279
    280 p_poly p_poly::p_poly_sub_const_to(const mpz_t a)
     280void p_poly::p_poly_sub_const_to(const mpz_t a)
    281281{
    282282    this->p_poly_sub_const(*this,a);
     
    285285
    286286//Monom Subtraktion
    287 p_poly p_poly::p_poly_sub_mon(const p_poly f , mpz_t a, int i)
     287void p_poly::p_poly_sub_mon(const p_poly f , mpz_t a, int i)
    288288{
    289289    mpz_t temp;
     
    293293
    294294//To Variante Monomaddition
    295 p_poly p_poly::p_poly_sub_mon_to(mpz_t a, int i)
     295void p_poly::p_poly_sub_mon_to(mpz_t a, int i)
    296296{
    297297    mpz_t temp;
     
    304304
    305305//Multiplikation mit Monom
    306 p_poly p_poly::p_poly_mon_mult( p_poly f, int n)
     306void p_poly::p_poly_mon_mult( p_poly f, int n)
    307307{
    308308    if (f.is_zero()==1)
     
    328328}
    329329
    330 p_poly p_poly::p_poly_mon_mult_to(const int n)
     330void p_poly::p_poly_mon_mult_to(const int n)
    331331{
    332332    this->p_poly_mon_mult(*this,n);
     
    336336//Multiplikation mit Skalar
    337337
    338 p_poly p_poly::p_poly_scalar_mult(const p_poly g, const mpz_t n)
     338void p_poly::p_poly_scalar_mult(const p_poly g, const mpz_t n)
    339339{
    340340    if (mpz_divisible_ui_p(n,g.mod)!=0)
     
    357357
    358358
    359 p_poly p_poly::p_poly_scalar_mult(const mpz_t n, const p_poly g)
     359void p_poly::p_poly_scalar_mult(const mpz_t n, const p_poly g)
    360360{
    361361    if (mpz_divisible_ui_p(n,g.mod)!=0)
     
    382382
    383383
    384 p_poly p_poly::p_poly_scalar_mult_to(const mpz_t n)
     384void p_poly::p_poly_scalar_mult_to(const mpz_t n)
    385385{
    386386    this->p_poly_scalar_mult(*this,n);
     
    391391// Negation
    392392
    393 p_poly p_poly::p_poly_neg()
     393void p_poly::p_poly_neg()
    394394{
    395395    for (int i=0;i<=deg;i++)
     
    400400
    401401// Naive Multiplikation
    402 p_poly p_poly::p_poly_mult_n(p_poly a,p_poly b)
     402void p_poly::p_poly_mult_n(p_poly a,p_poly b)
    403403{
    404404    //Reduktion mod p
     
    452452//Überschreibende Multiplikation
    453453
    454 p_poly p_poly::p_poly_mult_n_to(const p_poly g)
     454void p_poly::p_poly_mult_n_to(const p_poly g)
    455455{
    456456    this->p_poly_mult_n(*this,g);
     
    459459
    460460// Karatsuba-Multiplikation (Weimerskirch/Paar Alg. 1), ACHTUNG VORLÄUFIGE VERSION, macht noch Fehler beim Grad und ist unelegant !!!
    461 p_poly p_poly::p_poly_mult_ka( p_poly A,  p_poly B)
     461void p_poly::p_poly_mult_ka( p_poly A,  p_poly B)
    462462{
    463463
     
    528528//Skalare Divisionen
    529529
    530 p_poly p_poly::p_poly_scalar_div( const p_poly g, const mpz_t n)
     530void p_poly::p_poly_scalar_div( const p_poly g, const mpz_t n)
    531531{
    532532
     
    556556
    557557
    558 p_poly p_poly::p_poly_scalar_div_to(const mpz_t n)
     558void p_poly::p_poly_scalar_div_to(const mpz_t n)
    559559{
    560560    this->p_poly_scalar_div(*this,n);
     
    562562
    563563// Division durch Monom - Quotient
    564 p_poly p_poly::p_poly_mon_div(const p_poly f, const int n)
     564void p_poly::p_poly_mon_div(const p_poly f, const int n)
    565565{
    566566    if (f.deg<n)
     
    581581
    582582// Division durch Monom - Rest
    583 p_poly p_poly::p_poly_mon_div_rem(const p_poly f, const int n)
     583void p_poly::p_poly_mon_div_rem(const p_poly f, const int n)
    584584{
    585585    if (f.deg<n)
     
    605605//Euklidische Division nach Cohen Algo 3.1.1 (degA muss größer gleich deg B sein)!!
    606606
    607 p_poly p_poly::p_poly_div_rem( p_poly A,  p_poly B)
     607void p_poly::p_poly_div_rem( p_poly A,  p_poly B)
    608608{
    609609
     
    650650//To Variante von Algo 3.1.1 im Cohen
    651651
    652 p_poly p_poly::p_poly_div_rem_to(const p_poly B)
     652void p_poly::p_poly_div_rem_to(const p_poly B)
    653653{
    654654    this->p_poly_div_rem(*this,B);
     
    660660
    661661//Exakte Division nach Cohen 3.1.1
    662 p_poly p_poly::p_poly_div(p_poly &Q, p_poly &R, p_poly A,  p_poly B)
     662void p_poly::p_poly_div(p_poly &Q, p_poly &R, p_poly A,  p_poly B)
    663663{
    664664    if (B.is_zero()==0)
     
    716716//To Varainte der exakten Division
    717717
    718 p_poly p_poly::p_poly_div_to(p_poly &Q,p_poly &R, p_poly B)
     718void p_poly::p_poly_div_to(p_poly &Q,p_poly &R, p_poly B)
    719719{
    720720    this->p_poly_div(Q ,R,*this,B);
     
    725725
    726726// a := a*b + c
    727 p_poly p_poly::p_poly_multadd_to(const p_poly b, const p_poly c)
     727void p_poly::p_poly_multadd_to(const p_poly b, const p_poly c)
    728728{
    729729    p_poly_mult_n_to(b);
     
    732732
    733733//a=a*b-c
    734 p_poly p_poly::p_poly_multsub_to(const p_poly b, const p_poly c)
     734void p_poly::p_poly_multsub_to(const p_poly b, const p_poly c)
    735735{
    736736    p_poly_mult_n_to(b);
     
    742742/*
    743743// a := (a+b)* c
    744 p_poly p_poly::poly_addmult_to(const p_poly b, const p_poly c)
     744void p_poly::poly_addmult_to(const p_poly b, const p_poly c)
    745745{
    746746        p_poly a(deg,coef);
     
    800800
    801801//setze p_polynom auf p_polynom b
    802 p_poly p_poly::p_poly_set(const p_poly b)
     802void p_poly::p_poly_set(const p_poly b)
    803803{
    804804    deg=b.deg;
     
    814814
    815815// setze p_polynom auf konstantes p_polynom b
    816 p_poly p_poly::p_poly_set(const mpz_t b,int p)
     816void p_poly::p_poly_set(const mpz_t b,int p)
    817817{
    818818    deg=0;
     
    832832
    833833//setze p_polynom auf Nullpolynom
    834 p_poly p_poly::p_poly_set_zero()
     834void p_poly::p_poly_set_zero()
    835835{
    836836    deg = -1;
     
    840840//Vergleiche ob 2 p_polynome gleich return 1 falls ja sont 0
    841841
    842 int p_poly::is_equal(const p_poly g)
     842int p_poly::is_equal(const p_poly g) const
    843843{
    844844    if (deg!=g.deg)
     
    856856//ÜberprÃŒft ob das p_polynom 0 ist
    857857
    858 int p_poly::is_zero()
     858int p_poly::is_zero() const
    859859{
    860860    if (deg<0)
     
    865865}
    866866
    867 int p_poly::is_one()
     867int p_poly::is_one() const
    868868{
    869869    if (deg==0)
     
    875875}
    876876
    877 int p_poly::is_monic()
     877int p_poly::is_monic() const
    878878{
    879879    if (mpz_cmpabs_ui(coef[deg],1)==0)
     
    885885// klassischer GGT nach Cohen 3.2.1
    886886
    887 p_poly p_poly::p_poly_gcd( p_poly A,  p_poly B)
     887void p_poly::p_poly_gcd( p_poly A,  p_poly B)
    888888{
    889889
     
    917917//Nach nach Fieker 2.12 Symbolisches Rechnen (2012)
    918918// gibt g=s*A+t*B aus
    919 p_poly p_poly::p_poly_extgcd(p_poly &s,p_poly &t,p_poly &g, p_poly A, p_poly B)
     919void p_poly::p_poly_extgcd(p_poly &s,p_poly &t,p_poly &g, p_poly A, p_poly B)
    920920{
    921921
  • libpolys/coeffs/AEp.h

    rca4d699 reeb5b0c  
    2626
    2727    //Reduktion modulo p
    28     p_poly p_poly_reduce(p_poly, int);
     28    void p_poly_reduce(p_poly, int);
    2929
    3030    // Arithmetische Operationen
     
    3333    // Additionen
    3434
    35     p_poly p_poly_add(const p_poly , const p_poly );
    36     p_poly p_poly_add_to(const p_poly);
    37     p_poly p_poly_add_mon(const p_poly,mpz_t, int); //addiert Monome zu p_polynom
    38     p_poly p_poly_add_mon_to(mpz_t,int);
    39     p_poly p_poly_add_const( p_poly, const mpz_t);
    40     p_poly p_poly_add_const_to(const mpz_t);
     35    void p_poly_add(const p_poly , const p_poly );
     36    void p_poly_add_to(const p_poly);
     37    void p_poly_add_mon(const p_poly,mpz_t, int); //addiert Monome zu p_polynom
     38    void p_poly_add_mon_to(mpz_t,int);
     39    void p_poly_add_const( p_poly, const mpz_t);
     40    void p_poly_add_const_to(const mpz_t);
    4141
    4242    // Subtraktion
    4343
    44     p_poly p_poly_sub(const p_poly , const p_poly );
    45     p_poly p_poly_sub_to(const p_poly);
    46     p_poly p_poly_sub_mon(const p_poly,mpz_t,int);
    47     p_poly p_poly_sub_mon_to(mpz_t,int);
    48     p_poly p_poly_sub_const( p_poly, const mpz_t);
    49     p_poly p_poly_sub_const_to(const mpz_t);
     44    void p_poly_sub(const p_poly , const p_poly );
     45    void p_poly_sub_to(const p_poly);
     46    void p_poly_sub_mon(const p_poly,mpz_t,int);
     47    void p_poly_sub_mon_to(mpz_t,int);
     48    void p_poly_sub_const( p_poly, const mpz_t);
     49    void p_poly_sub_const_to(const mpz_t);
    5050
    5151    //Multiplikationen
    5252
    53     p_poly p_poly_mult_n(p_poly,p_poly);
    54     p_poly p_poly_mult_n_to(const p_poly);
    55     p_poly p_poly_mult_ka( p_poly, p_poly);
    56     p_poly p_poly_scalar_mult(const mpz_t ,const p_poly);
    57     p_poly p_poly_scalar_mult(const p_poly, const mpz_t);
    58     p_poly p_poly_scalar_mult_to(const mpz_t);
    59     p_poly p_poly_neg();
    60     p_poly p_poly_mon_mult( p_poly, const int);
    61     p_poly p_poly_mon_mult_to(const int);
     53    void p_poly_mult_n(p_poly,p_poly);
     54    void p_poly_mult_n_to(const p_poly);
     55    void p_poly_mult_ka( p_poly, p_poly);
     56    void p_poly_scalar_mult(const mpz_t ,const p_poly);
     57    void p_poly_scalar_mult(const p_poly, const mpz_t);
     58    void p_poly_scalar_mult_to(const mpz_t);
     59    void p_poly_neg();
     60    void p_poly_mon_mult( p_poly, const int);
     61    void p_poly_mon_mult_to(const int);
    6262
    6363    //Divisionen
    64     p_poly p_poly_div(p_poly&, p_poly&, p_poly,  p_poly); // exakte Division
    65     p_poly p_poly_div_to(p_poly&, p_poly&, p_poly);       // To Variante exakte Division
    66     p_poly p_poly_scalar_div(const p_poly, const mpz_t n); // Multipliziert konstante an Polynom
    67     p_poly p_poly_scalar_div_to(const mpz_t n);
    68     p_poly p_poly_div_rem( p_poly, p_poly);//Division mit Rest
    69     p_poly p_poly_div_rem_to( p_poly);
    70     p_poly p_poly_mon_div(const p_poly, const int); //Division durch MOnom
    71     p_poly p_poly_mon_div_rem(const p_poly, const int);
     64    void p_poly_div(p_poly&, p_poly&, p_poly,  p_poly); // exakte Division
     65    void p_poly_div_to(p_poly&, p_poly&, p_poly);       // To Variante exakte Division
     66    void p_poly_scalar_div(const p_poly, const mpz_t n); // Multipliziert konstante an Polynom
     67    void p_poly_scalar_div_to(const mpz_t n);
     68    void p_poly_div_rem( p_poly, p_poly);//Division mit Rest
     69    void p_poly_div_rem_to( p_poly);
     70    void p_poly_mon_div(const p_poly, const int); //Division durch MOnom
     71    void p_poly_mon_div_rem(const p_poly, const int);
    7272
    7373    //Kombinationen
    7474
    75     p_poly p_poly_multadd_to(const p_poly, const p_poly); //a=a*b+c
    76     p_poly p_poly_multsub_to(const p_poly,const p_poly);  //a=a*b-c
     75    void p_poly_multadd_to(const p_poly, const p_poly); //a=a*b+c
     76    void p_poly_multsub_to(const p_poly,const p_poly);  //a=a*b-c
    7777    //p_poly p_poly_addmult_to(const p_poly, const p_poly);
    7878
     
    8181
    8282    // Sonstige Operationen
    83     p_poly p_poly_set(const p_poly);
    84     p_poly p_poly_set(const mpz_t,int);                // Setzt p_polynom auf Konstante
    85     p_poly p_poly_set_zero();                        // Setzt p_polynom auf 0
     83    void p_poly_set(const p_poly);
     84    void p_poly_set(const mpz_t,int);                // Setzt p_polynom auf Konstante
     85    void p_poly_set_zero();                        // Setzt p_polynom auf 0
    8686    void p_poly_horner(mpz_t, const mpz_t);        // Wertet p_polynom mittels Horner-Schema an einer Stelle aus
    8787    void p_poly_horner_p_poly(p_poly, p_poly);        //Setzt p_polynom in p_polynom mittels Horner Schema ein
    88     p_poly p_poly_gcd(p_poly,p_poly);                //Standard GGT
    89     p_poly p_poly_extgcd(p_poly &,p_poly &,p_poly &, p_poly, p_poly);        //Erweiterter Standard GGT
    90     int is_equal(const p_poly);                // Test auf Gleichheit
    91     int is_zero();                                // Test auf Gleichheit mit 0
    92     int is_one();                                // Test auf Gleichheit mit 1
    93     int is_monic();                                // testet, ob das p_polynom normiert ist
     88    void p_poly_gcd(p_poly,p_poly);                //Standard GGT
     89    void p_poly_extgcd(p_poly &,p_poly &,p_poly &, p_poly, p_poly);        //Erweiterter Standard GGT
     90    int is_equal(const p_poly) const;                // Test auf Gleichheit
     91    int is_zero() const;                                // Test auf Gleichheit mit 0
     92    int is_one() const;                                // Test auf Gleichheit mit 1
     93    int is_monic() const;                                // testet, ob das p_polynom normiert ist
    9494
    9595    // Ein und Ausgabe
  • libpolys/coeffs/OPAE.cc

    rca4d699 reeb5b0c  
    2828// DEFINITION DER FUNKTIONEN
    2929
    30 number  nAEAdd(number a, number b,const coeffs r)
     30number  nAEAdd(number a, number b, const coeffs)
    3131{
    3232    int_poly* f=reinterpret_cast<int_poly*> (a);
     
    3838}
    3939
    40 number  nAEMult(number a, number b,const coeffs r)
     40number  nAEMult(number a, number b, const coeffs)
    4141{
    4242    int_poly* f=reinterpret_cast<int_poly*> (a);
     
    4848}
    4949
    50 number  nAESub(number a, number b,const coeffs r)
     50number  nAESub(number a, number b, const coeffs)
    5151{
    5252    int_poly* f=reinterpret_cast<int_poly*> (a);
     
    5959
    6060
    61 number  nAEDiv(number a, number b,const coeffs r)
     61number  nAEDiv(number a, number b, const coeffs)
    6262{
    6363    int_poly* f=reinterpret_cast<int_poly*> (a);
     
    7070
    7171
    72 number  nAEIntDiv(number a, number b,const coeffs r)
     72number  nAEIntDiv(number a, number b, const coeffs)
    7373{
    7474
     
    8181}
    8282
    83 number  nAEIntMod(number a, number b,const coeffs r)
     83number  nAEIntMod(number a, number, const coeffs)
    8484{
    8585    return a;
    8686}
    8787
    88 number  nAEExactDiv(number a, number b,const coeffs r)
     88number  nAEExactDiv(number a, number b, const coeffs)
    8989{
    9090    int_poly* f=reinterpret_cast<int_poly*> (a);
     
    9898
    9999
    100 number nAEInit(long i, const coeffs r)
     100number nAEInit(long i, const coeffs)
    101101{
    102102    mpz_t m;
    103     mpz_init_set_ui(m,i);
     103    mpz_init_set_ui(m, i);
    104104    int_poly* res=new int_poly;
    105105    res->poly_set(m);
     
    108108}
    109109
    110 number nAEInitMPZ(mpz_t m, const coeffs r)
     110number nAEInitMPZ(mpz_t m, const coeffs)
    111111{
    112112    int_poly* res=new int_poly;
     
    117117
    118118
    119 int nAESize (number a,const coeffs r)
     119int nAESize (number a, const coeffs)
    120120{
    121121    int_poly* f=reinterpret_cast<int_poly*> (a);
     
    123123}
    124124
    125 int nAEInt(number &a,const coeffs r)
     125int nAEInt(number &, const coeffs)
    126126{
    127127    return 1;
     
    129129
    130130
    131 number nAEMPZ(number a,const coeffs r)
     131number nAEMPZ(number a, const coeffs)
    132132{
    133133    return a;
     
    135135
    136136
    137 number nAENeg(number c, const coeffs r)
     137number nAENeg(number c, const coeffs)
    138138{
    139139    int_poly* f=reinterpret_cast<int_poly*> (c);
     
    144144}
    145145
    146 number nAECopy(number c, const coeffs r)
     146number nAECopy(number c, const coeffs)
    147147{
    148148    return (number) c;
    149149}
    150150
    151 number nAERePart(number c, const coeffs r)
     151number nAERePart(number c, const coeffs)
    152152{
    153153    return (number) c;
    154154}
    155155
    156 number nAEImPart(number c, const coeffs r)
     156number nAEImPart(number c, const coeffs)
    157157{
    158158    return (number) c;
    159159}
    160160
    161 void    nAEWriteLong   (number &a, const coeffs r)
     161void    nAEWriteLong   (number &a, const coeffs)
    162162{
    163163    int_poly* f=reinterpret_cast <int_poly*>(a);
     
    166166}
    167167
    168 void    nAEWriteShort  (number &a, const coeffs r)
     168void    nAEWriteShort  (number &a, const coeffs)
    169169{
    170170    int_poly* f=reinterpret_cast <int_poly*>(a);
     
    174174
    175175
    176 const char *  nAERead  (const char *s, number *a,const coeffs r)
     176const char *  nAERead  (const char *, number *, const coeffs)
    177177{
    178178    char* c=new char;
     
    181181}
    182182
    183 number nAENormalize    (number a,number b,const coeffs r) // ?
     183number nAENormalize    (number a, number, const coeffs) // ?
    184184{
    185185        return a;
    186186}
    187187
    188 BOOLEAN nAEGreater     (number a, number b,const coeffs r)
     188BOOLEAN nAEGreater     (number a, number b, const coeffs)
    189189{
    190190        int_poly* f=reinterpret_cast<int_poly*> (a);
     
    194194}
    195195
    196 BOOLEAN nAEEqual     (number a, number b,const coeffs r)
     196BOOLEAN nAEEqual     (number a, number b, const coeffs)
    197197{
    198198        int_poly* f=reinterpret_cast<int_poly*> (a);
     
    202202}
    203203
    204 BOOLEAN nAEIsZero      (number a,const coeffs r)
     204BOOLEAN nAEIsZero      (number a, const coeffs)
    205205{
    206206        int_poly* f=reinterpret_cast<int_poly*> (a);
     
    209209}
    210210
    211 BOOLEAN nAEIsOne      (number a,const coeffs r)
     211BOOLEAN nAEIsOne      (number a, const coeffs)
    212212{
    213213        int_poly* f=reinterpret_cast<int_poly*> (a);
     
    216216}
    217217
    218 BOOLEAN nAEIsMOne      (number a,const coeffs r)
     218BOOLEAN nAEIsMOne      (number a, const coeffs)
    219219{
    220220        int_poly* f=reinterpret_cast<int_poly*> (a);
     
    225225BOOLEAN nAEGreaterZero     (number a, const coeffs r)
    226226{
    227         if (nAEIsZero(a,r) == FALSE) { return TRUE; }
     227        if (nAEIsZero(a, r) == FALSE) { return TRUE; }
    228228        else { return FALSE; }
    229229}
    230230
    231 void    nAEPower       (number a, int i, number * result,const coeffs r)
     231void    nAEPower       (number, int, number *, const coeffs)
    232232{
    233233        return;
    234234}
    235235
    236 number nAEGetDenom      (number &a, const coeffs r)
     236number nAEGetDenom      (number &, const coeffs)
    237237{
    238238        return (number) 1;
    239239}
    240240
    241 number nAEGetNumerator      (number &a, const coeffs r)
     241number nAEGetNumerator      (number &a, const coeffs)
    242242{
    243243        return a;
    244244}
    245245
    246 number nAEGcd           (number a,number b,const coeffs r)
     246number nAEGcd           (number a, number b, const coeffs)
    247247{
    248248        int_poly* f=reinterpret_cast<int_poly*> (a);
     
    253253}
    254254
    255 number nAELcm          (number a,number b,const coeffs r)
     255number nAELcm          (number a, number b, const coeffs)
    256256{
    257257        int_poly* f=reinterpret_cast<int_poly*> (a);
     
    265265}
    266266
    267 void    nAEDelete       (number *a, const coeffs r)
     267void    nAEDelete       (number *, const coeffs)
    268268{
    269269        return;
     
    271271
    272272/*
    273 number    nAESetMap        (number a, const coeffs r)
     273number    nAESetMap        (number a, const coeffs)
    274274{
    275275        return a;
    276276}
    277277*/
    278 char*    nAEName       (number a, const coeffs r)
     278char*    nAEName       (number, const coeffs)
    279279{       char *c=new char;
    280280        *c='c';
     
    282282}
    283283
    284 void    nAEInpMult       (number &a, number b,const coeffs r)
     284void    nAEInpMult       (number &, number, const coeffs)
    285285{
    286286        return ;
    287287}
    288288
    289 void    nAECoeffWrite   (const coeffs r, BOOLEAN details)
     289void    nAECoeffWrite   (const coeffs, BOOLEAN)
    290290{
    291291        return;
    292292}
    293293
    294 BOOLEAN nAEClearContent  (number a,const coeffs r)
     294BOOLEAN nAEClearContent  (number, const coeffs)
    295295{
    296296        return FALSE;
    297297}
    298298
    299 BOOLEAN nAEClearDenominators  (number a,const coeffs r)
     299BOOLEAN nAEClearDenominators  (number, const coeffs)
    300300{
    301301        return FALSE;
     
    307307
    308308
    309 BOOLEAN n_AEInitChar(coeffs r,void * p) // vlt noch void* p hin
    310 {
    311 
     309BOOLEAN n_AEInitChar(coeffs r, void *)
     310{
    312311    r->ch = 0;
    313312    r->cfKillChar=NULL;
  • libpolys/coeffs/OPAE.h

    rca4d699 reeb5b0c  
    99
    1010BOOLEAN n_AEInitChar(coeffs , void *);
    11 BOOLEAN nAECoeffIsEqual     (number a, number b,const coeffs r);
     11BOOLEAN nAECoeffIsEqual     (number a, number b, const coeffs r);
    1212number  nAEMult        (number a, number b, const coeffs r);
    13 number  nAESub         (number a, number b,const coeffs r);
    14 number  nAEAdd         (number a, number b,const coeffs r);
    15 number  nAEDiv         (number a, number b,const coeffs r);
     13number  nAESub         (number a, number b, const coeffs r);
     14number  nAEAdd         (number a, number b, const coeffs r);
     15number  nAEDiv         (number a, number b, const coeffs r);
    1616number  nAEIntDiv      (number a, number b, const coeffs r); //Hir wollte wir was gucken
    1717number  nAEIntMod      (number a, number b, const coeffs r);// Hir wollte wir was gucken
    18 number  nAEExactDiv    (number a, number b,const coeffs r);
     18number  nAEExactDiv    (number a, number b, const coeffs r);
    1919number  nAEInit        (long i, const coeffs r);
    2020number  nAEInitMPZ     (mpz_t m, const coeffs r); //nachgucken/fragen
    2121int     nAESize        (number a, const coeffs r);///
    22 int     nAEInt         (number &a,const coeffs r);
    23 number  nAEMPZ         (number a,const coeffs r); //nachgucken/fragen
    24 number  nAENeg         (number c,const coeffs r);
    25 number  nAECopy        (number a, number b,const coeffs r); // nachgicken
    26 number  nAERePart      (number a, number b,const coeffs r); // nachgicken
    27 number  nAEImPart      (number a, number b,const coeffs r); // nachgicken
     22int     nAEInt         (number &a, const coeffs r);
     23number  nAEMPZ         (number a, const coeffs r); //nachgucken/fragen
     24number  nAENeg         (number c, const coeffs r);
     25number  nAECopy        (number a, number b, const coeffs r); // nachgicken
     26number  nAERePart      (number a, number b, const coeffs r); // nachgicken
     27number  nAEImPart      (number a, number b, const coeffs r); // nachgicken
    2828
    2929void    nAEWriteLong   (number &a, const coeffs r);//
     
    3131
    3232
    33 const char *  nAERead  (const char *s, number *a,const coeffs r);
    34 number nAENormalize    (number a,number b,const coeffs r);//
    35 BOOLEAN nAEGreater     (number a, number b,const coeffs r);//
    36 BOOLEAN nAEEqual       (number a, number b,const coeffs r);
    37 BOOLEAN nAEIsZero      (number a,const coeffs r);
    38 BOOLEAN nAEIsOne       (number a,const coeffs r);
    39 BOOLEAN nAEIsMOne      (number a,const coeffs r);
    40 BOOLEAN nAEGreaterZero (number a, number b,const coeffs r);
    41 void    nAEPower       (number a, int i, number * result,const coeffs r);
     33const char *  nAERead  (const char *s, number *a, const coeffs r);
     34number nAENormalize    (number a, number b, const coeffs r);//
     35BOOLEAN nAEGreater     (number a, number b, const coeffs r);//
     36BOOLEAN nAEEqual       (number a, number b, const coeffs r);
     37BOOLEAN nAEIsZero      (number a, const coeffs r);
     38BOOLEAN nAEIsOne       (number a, const coeffs r);
     39BOOLEAN nAEIsMOne      (number a, const coeffs r);
     40BOOLEAN nAEGreaterZero (number a, number b, const coeffs r);
     41void    nAEPower       (number a, int i, number * result, const coeffs r);
    4242number nAEGetDenom     (number &a, const coeffs r);//
    4343number nAEGetNumerator (number &a, const coeffs r);//
    44 number nAEGcd          (number a,number b,const coeffs r);
    45 number nAELcm          (number a,number b,const coeffs r);
     44number nAEGcd          (number a, number b, const coeffs r);
     45number nAELcm          (number a, number b, const coeffs r);
    4646
    4747void    nAEDelete       (number *a, const coeffs r);//
     
    5151void    nAECoeffWrite   (const coeffs r, BOOLEAN details);//
    5252
    53 BOOLEAN nAEClearContent  (number a,const coeffs r);//
    54 BOOLEAN nAEClearDenominators  (number a,const coeffs r);//
     53BOOLEAN nAEClearContent  (number a, const coeffs r);//
     54BOOLEAN nAEClearDenominators  (number a, const coeffs r);//
    5555
    5656
  • libpolys/coeffs/OPAEQ.cc

    rca4d699 reeb5b0c  
    2929// DEFINITION DER FUNKTIONEN
    3030
    31 number  nAEQAdd(number a, number b,const coeffs r)
     31number  nAEQAdd(number a, number b, const coeffs)
    3232{
    3333    Q_poly* f=reinterpret_cast<Q_poly*> (a);
     
    3939}
    4040
    41 number  nAEQMult(number a, number b,const coeffs r)
     41number  nAEQMult(number a, number b, const coeffs)
    4242{
    4343    Q_poly* f=reinterpret_cast<Q_poly*> (a);
     
    4949}
    5050
    51 number  nAEQSub(number a, number b,const coeffs r)
     51number  nAEQSub(number a, number b, const coeffs)
    5252{
    5353    Q_poly* f=reinterpret_cast<Q_poly*> (a);
     
    6060
    6161
    62 number  nAEQDiv(number a, number b,const coeffs r)
     62number  nAEQDiv(number a, number b, const coeffs)
    6363{
    6464    Q_poly* f=reinterpret_cast<Q_poly*> (a);
     
    7272
    7373
    74 number  nAEQIntDiv(number a, number b,const coeffs r)
     74number  nAEQIntDiv(number a, number b, const coeffs)
    7575{
    7676
     
    8383}
    8484
    85 number  nAEQIntMod(number a, number b,const coeffs r)
     85number  nAEQIntMod(number a, number, const coeffs)
    8686{
    8787    return a;
    8888}
    8989
    90 number  nAEQExactDiv(number a, number b,const coeffs r)
     90number  nAEQExactDiv(number a, number b, const coeffs)
    9191{
    9292    Q_poly* f=reinterpret_cast<Q_poly*> (a);
     
    101101
    102102
    103 number nAEQInit(long i, const coeffs r)
     103number nAEQInit(long i, const coeffs)
    104104{
    105105    number res = (number) i;
     
    107107}
    108108
    109 number nAEQInitMPZ(mpz_t m, const coeffs r)
     109number nAEQInitMPZ(mpz_t m, const coeffs)
    110110{
    111111    number res= (number) m;
     
    113113}
    114114
    115 int nAEQSize (number a,const coeffs r)
     115int nAEQSize (number a, const coeffs)
    116116{
    117117    Q_poly* f=reinterpret_cast<Q_poly*> (a);
     
    119119}
    120120
    121 int nAEQInt(number &a,const coeffs r)
     121int nAEQInt(number &, const coeffs)
    122122{
    123123    return 1;
     
    125125
    126126
    127 number nAEQMPZ(number a,const coeffs r)
     127number nAEQMPZ(number a, const coeffs)
    128128{
    129129    return a;
     
    131131
    132132
    133 number nAEQNeg(number c, const coeffs r)
     133number nAEQNeg(number c, const coeffs)
    134134{
    135135    Q_poly* f=reinterpret_cast<Q_poly*> (c);
     
    140140}
    141141
    142 number nAEQCopy(number c, const coeffs r)
     142number nAEQCopy(number c, const coeffs)
    143143{
    144144    return (number) c;
    145145}
    146146
    147 number nAEQRePart(number c, const coeffs r)
     147number nAEQRePart(number c, const coeffs)
    148148{
    149149    return (number) c;
    150150}
    151151
    152 number nAEQImPart(number c, const coeffs r)
     152number nAEQImPart(number c, const coeffs)
    153153{
    154154    return (number) c;
    155155}
    156156
    157 void    nAEQWriteLong   (number &a, const coeffs r)
     157void    nAEQWriteLong   (number &, const coeffs)
    158158{
    159159    return;
    160160}
    161161
    162 void    nAEQWriteShort  (number &a, const coeffs r)
     162void    nAEQWriteShort  (number &, const coeffs)
    163163{
    164164    return ;
     
    166166
    167167
    168 const char *  nAEQRead  (const char *s, number *a,const coeffs r)
     168const char *  nAEQRead  (const char *, number *, const coeffs)
    169169{
    170170    return "";
    171171}
    172172
    173 number nAEQNormalize    (number a,number b,const coeffs r) // ?
     173number nAEQNormalize    (number a, number , const coeffs) // ?
    174174{
    175175    return a;
    176176}
    177177
    178 BOOLEAN nAEQGreater     (number a, number b,const coeffs r)
     178BOOLEAN nAEQGreater     (number a, number b, const coeffs)
    179179{
    180180    Q_poly* f=reinterpret_cast<Q_poly*> (a);
     
    184184}
    185185
    186 BOOLEAN nAEQEqual     (number a, number b,const coeffs r)
     186BOOLEAN nAEQEqual     (number a, number b, const coeffs)
    187187{
    188188    Q_poly* f=reinterpret_cast<Q_poly*> (a);
     
    192192}
    193193
    194 BOOLEAN nAEQIsZero      (number a,const coeffs r)
     194BOOLEAN nAEQIsZero      (number a, const coeffs)
    195195{
    196196    Q_poly* f=reinterpret_cast<Q_poly*> (a);
     
    199199}
    200200
    201 BOOLEAN nAEQIsOne      (number a,const coeffs r)
     201BOOLEAN nAEQIsOne      (number a, const coeffs)
    202202{
    203203    Q_poly* f=reinterpret_cast<Q_poly*> (a);
     
    206206}
    207207
    208 BOOLEAN nAEQIsMOne      (number a,const coeffs r)
     208BOOLEAN nAEQIsMOne      (number a, const coeffs)
    209209{
    210210    Q_poly* f=reinterpret_cast<Q_poly*> (a);
     
    215215BOOLEAN nAEQGreaterZero     (number a, const coeffs r)
    216216{
    217     if (nAEQIsZero(a,r) == FALSE) { return TRUE; }
     217    if (nAEQIsZero(a, r) == FALSE) { return TRUE; }
    218218    else { return FALSE; }
    219219}
    220220
    221 void    nAEQPower       (number a, int i, number * result,const coeffs r)
     221void    nAEQPower       (number, int, number *, const coeffs)
    222222{
    223223    return;
    224224}
    225225
    226 number nAEQGetDenom      (number &a, const coeffs r)
     226number nAEQGetDenom      (number &, const coeffs)
    227227{
    228228    return (number) 1;
    229229}
    230230
    231 number nAEQGetNumerator      (number &a, const coeffs r)
     231number nAEQGetNumerator      (number &a, const coeffs)
    232232{
    233233    return a;
    234234}
    235235
    236 number nAEQGcd           (number a,number b,const coeffs r)
     236number nAEQGcd           (number a, number b, const coeffs)
    237237{
    238238    Q_poly* f=reinterpret_cast<Q_poly*> (a);
     
    243243}
    244244
    245 number nAEQLcm          (number a,number b,const coeffs r)
     245number nAEQLcm          (number a, number b, const coeffs)
    246246{
    247247    Q_poly* f=reinterpret_cast<Q_poly*> (a);
     
    256256}
    257257
    258 void    nAEQDelete       (number *a, const coeffs r)
     258void    nAEQDelete       (number *, const coeffs)
    259259{
    260260    return;
     
    262262
    263263/*
    264 number    nAEQSetMap        (number a, const coeffs r)
     264number    nAEQSetMap        (number a, const coeffs)
    265265{
    266266        return a;
    267267}
    268268*/
    269 char*    nAEQName       (number a, const coeffs r)
     269char*    nAEQName       (number, const coeffs)
    270270{
    271271    char* c=new char;
     
    275275}
    276276
    277 void    nAEQInpMult       (number &a, number b,const coeffs r)
     277void    nAEQInpMult       (number &, number, const coeffs)
    278278{
    279279    return ;
    280280}
    281281
    282 void    nAEQCoeffWrite   (const coeffs r, BOOLEAN details)
     282void    nAEQCoeffWrite   (const coeffs, BOOLEAN)
    283283{
    284284    return;
    285285}
    286286
    287 BOOLEAN nAEQClearContent  (number a,const coeffs r)
     287BOOLEAN nAEQClearContent  (number, const coeffs)
    288288{
    289289    return FALSE;
    290290}
    291291
    292 BOOLEAN nAEQClearDenominators  (number a,const coeffs r)
     292BOOLEAN nAEQClearDenominators  (number, const coeffs)
    293293{
    294294    return FALSE;
     
    300300
    301301
    302 BOOLEAN n_QAEInitChar(coeffs r,void *p) // vlt noch void* p hin
    303 {
    304 
    305 
    306 
     302BOOLEAN n_QAEInitChar(coeffs r, void *)
     303{
    307304    r->ch=0;
    308305    r->cfKillChar=NULL;
  • libpolys/coeffs/OPAEQ.h

    rca4d699 reeb5b0c  
    99
    1010BOOLEAN n_QAEInitChar(coeffs , void *);
    11 BOOLEAN nAEQCoeffIsEqual     (number a, number b,const coeffs r);
     11BOOLEAN nAEQCoeffIsEqual     (number a, number b, const coeffs r);
    1212number  nAEQMult        (number a, number b, const coeffs r);
    13 number  nAEQSub         (number a, number b,const coeffs r);
    14 number  nAEQAdd         (number a, number b,const coeffs r);
    15 number  nAEQDiv         (number a, number b,const coeffs r);
     13number  nAEQSub         (number a, number b, const coeffs r);
     14number  nAEQAdd         (number a, number b, const coeffs r);
     15number  nAEQDiv         (number a, number b, const coeffs r);
    1616number  nAEQIntDiv      (number a, number b, const coeffs r); //Hir wollte wir was gucken
    1717number  nAEQIntMod      (number a, number b, const coeffs r);// Hir wollte wir was gucken
    18 number  nAEQExactDiv    (number a, number b,const coeffs r);
     18number  nAEQExactDiv    (number a, number b, const coeffs r);
    1919number  nAEQInit        (long i, const coeffs r);
    2020number  nAEQInitMPZ     (mpz_t m, const coeffs r); //nachgucken/fragen
    2121int     nAEQSize        (number a, const coeffs r);///
    22 int     nAEQInt         (number &a,const coeffs r);
    23 number  nAEQMPZ         (number a,const coeffs r); //nachgucken/fragen
    24 number  nAEQNeg         (number c,const coeffs r);
    25 number  nAEQCopy        (number a, number b,const coeffs r); // nachgicken
    26 number  nAEQRePart      (number a, number b,const coeffs r); // nachgicken
    27 number  nAEQImPart      (number a, number b,const coeffs r); // nachgicken
     22int     nAEQInt         (number &a, const coeffs r);
     23number  nAEQMPZ         (number a, const coeffs r); //nachgucken/fragen
     24number  nAEQNeg         (number c, const coeffs r);
     25number  nAEQCopy        (number a, number b, const coeffs r); // nachgicken
     26number  nAEQRePart      (number a, number b, const coeffs r); // nachgicken
     27number  nAEQImPart      (number a, number b, const coeffs r); // nachgicken
    2828
    2929void    nAEQWriteLong   (number &a, const coeffs r);//
     
    3131
    3232
    33 const char *  nAEQRead  (const char *s, number *a,const coeffs r);
    34 number nAEQNormalize    (number a,number b,const coeffs r);//
    35 BOOLEAN nAEQGreater     (number a, number b,const coeffs r);//
    36 BOOLEAN nAEQEqual       (number a, number b,const coeffs r);
    37 BOOLEAN nAEQIsZero      (number a,const coeffs r);
    38 BOOLEAN nAEQIsOne       (number a,const coeffs r);
    39 BOOLEAN nAEQIsMOne      (number a,const coeffs r);
    40 BOOLEAN nAEQGreaterZero (number a, number b,const coeffs r);
    41 void    nAEQPower       (number a, int i, number * result,const coeffs r);
     33const char *  nAEQRead  (const char *s, number *a, const coeffs r);
     34number nAEQNormalize    (number a, number b, const coeffs r);//
     35BOOLEAN nAEQGreater     (number a, number b, const coeffs r);//
     36BOOLEAN nAEQEqual       (number a, number b, const coeffs r);
     37BOOLEAN nAEQIsZero      (number a, const coeffs r);
     38BOOLEAN nAEQIsOne       (number a, const coeffs r);
     39BOOLEAN nAEQIsMOne      (number a, const coeffs r);
     40BOOLEAN nAEQGreaterZero (number a, number b, const coeffs r);
     41void    nAEQPower       (number a, int i, number * result, const coeffs r);
    4242number nAEQGetDenom     (number &a, const coeffs r);//
    4343number nAEQGetNumerator (number &a, const coeffs r);//
    44 number nAEQGcd          (number a,number b,const coeffs r);
    45 number nAEQLcm          (number a,number b,const coeffs r);
     44number nAEQGcd          (number a, number b, const coeffs r);
     45number nAEQLcm          (number a, number b, const coeffs r);
    4646
    4747void    nAEQDelete       (number *a, const coeffs r);//
     
    5151void    nAEQCoeffWrite   (const coeffs r, BOOLEAN details);//
    5252
    53 BOOLEAN nAEQClearContent  (number a,const coeffs r);//
    54 BOOLEAN nAEQClearDenominators  (number a,const coeffs r);//
     53BOOLEAN nAEQClearContent  (number a, const coeffs r);//
     54BOOLEAN nAEQClearDenominators  (number a, const coeffs r);//
    5555
    5656
  • libpolys/coeffs/OPAEp.cc

    rca4d699 reeb5b0c  
    2929// DEFINITION DER FUNKTIONEN
    3030
    31 number  nAEpAdd(number a, number b,const coeffs r)
     31number  nAEpAdd(number a, number b, const coeffs)
    3232{
    3333    p_poly* f=reinterpret_cast<p_poly*> (a);
     
    3939}
    4040
    41 number  nAEpMult(number a, number b,const coeffs r)
     41number  nAEpMult(number a, number b, const coeffs)
    4242{
    4343    p_poly* f=reinterpret_cast<p_poly*> (a);
     
    4949}
    5050
    51 number  nAEpSub(number a, number b,const coeffs r)
     51number  nAEpSub(number a, number b, const coeffs)
    5252{
    5353    p_poly* f=reinterpret_cast<p_poly*> (a);
     
    6060
    6161
    62 number  nAEpDiv(number a, number b,const coeffs r)
     62number  nAEpDiv(number a, number b, const coeffs)
    6363{
    6464    p_poly* f=reinterpret_cast<p_poly*> (a);
     
    7272
    7373
    74 number  nAEpIntDiv(number a, number b,const coeffs r)
     74number  nAEpIntDiv(number a, number b, const coeffs)
    7575{
    7676
     
    8383}
    8484
    85 number  nAEpIntMod(number a, number b,const coeffs r)
     85number  nAEpIntMod(number a, number, const coeffs)
    8686{
    8787    return a;
    8888}
    8989
    90 number  nAEpExactDiv(number a, number b,const coeffs r)
     90number  nAEpExactDiv(number a, number b, const coeffs)
    9191{