Changeset c5a888 in git


Ignore:
Timestamp:
May 4, 1998, 7:18:23 PM (26 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b52fc4b2495505785981d640dcf7eb3e456778ef')
Children:
386c6bc814514586879cb19ec90ecaa64971b294
Parents:
e54eb45c84188f8b4408403f6b00d223ab8140c0
Message:
* rm'ed long commented source code


git-svn-id: file:///usr/local/Singular/svn/trunk@1596 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/spolys0.cc

    re54eb4 rc5a888  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: spolys0.cc,v 1.10 1998-03-18 14:28:54 obachman Exp $ */
     4/* $Id: spolys0.cc,v 1.11 1998-05-04 17:18:23 obachman Exp $ */
    55
    66/*
     
    844844}
    845845
    846 /*2
    847 * creates the last term of the S-polynomial of p1 and p2
    848 * in order to compute the ecart
    849 * do not destroy p1 and p2
    850 * remarks:
    851 *   1. the coefficient is undefined
    852 *   2. see above
    853 */
    854 /*
    855 *static poly spGSpolyLast(poly p1, poly p2)
    856 *{
    857 *  poly a1 = pNext(p1), a2 = pNext(p2);
    858 *  poly m, b, L1, L2;
    859 *  number ta,tb,t;
    860 *  int c;
    861 *
    862 *  m = pNew();
    863 *  b = pNew();
    864 *  spMemcpy(m,p2);
    865 *  spMonSub(m,p1);
    866 *  pSetComp(b,pGetComp(p1));
    867 *  if (a2)
    868 *  {
    869 *    while (pNext(a2))
    870 *      pIter(a2);
    871 *  }
    872 *  if (a1)
    873 *  {
    874 *    while (pNext(a1))
    875 *      pIter(a1);
    876 *    spMemcpy(b,a1);
    877 *    spMonAdd(b,m);
    878 *  }
    879 *  else
    880 *  {
    881 *    spShort2(b,a2,m);
    882 *    return b;
    883 *  }
    884 *  if(!a2)
    885 *  {
    886 *    spShort1(b,a1,m);
    887 *    return b;
    888 *  }
    889 *  for (; ; )
    890 *  {
    891 *    c = pComp0(b, a2);
    892 *    if (c == -1)
    893 *    {
    894 *      spShort1(b,a1,m);
    895 *      return b;
    896 *    }
    897 *    else if (c == 1)
    898 *    {
    899 *      spShort2(b,a2,m);
    900 *      return b;
    901 *    }
    902 *    else
    903 *    {
    904 *      if (nIsOne(pGetCoeff(p1)))
    905 *      {
    906 *        if (nIsOne(pGetCoeff(p2)))
    907 *          t = nSub(pGetCoeff(a2), pGetCoeff(a1));
    908 *        else
    909 *        {
    910 *          ta = nMult(pGetCoeff(a1), pGetCoeff(p2));
    911 *          t = nSub(ta, pGetCoeff(a2));
    912 *          nDelete(&ta);
    913 *        }
    914 *      }
    915 *      else
    916 *      {
    917 *        if (nIsOne(pGetCoeff(p2)))
    918 *        {
    919 *          ta = nMult(pGetCoeff(a2), pGetCoeff(p1));
    920 *          t = nSub(ta, pGetCoeff(a1));
    921 *        }
    922 *        else
    923 *        {
    924 *          ta = nMult(pGetCoeff(a1), pGetCoeff(p2));
    925 *          tb = nMult(pGetCoeff(a2), pGetCoeff(p1));
    926 *          t = nSub(ta, tb);
    927 *          nDelete(&tb);
    928 *        }
    929 *        nDelete(&ta);
    930 *      }
    931 *      if (!nIsZero(t))
    932 *      {
    933 *        nDelete(&t);
    934 *        spShort1(b,a1,m);
    935 *        return b;
    936 *      }
    937 *      nDelete(&t);
    938 *      if (a1 != pNext(p1))
    939 *      {
    940 *        L1 = a1;
    941 *        a1 = pNext(p1);
    942 *        while (pNext(a1) != L1)
    943 *          pIter(a1);
    944 *        spMemcpy(b,a1);
    945 *        spMonAdd(b,m);
    946 *      }
    947 *      if (a2 != pNext(p2))
    948 *      {
    949 *        L2 = a2;
    950 *        a2 = pNext(p2);
    951 *        while (pNext(a2) != L2)
    952 *          pIter(a2);
    953 *      }
    954 *    }
    955 *  }
    956 *}
    957 */
    958 /*2
    959 * creates the leading term of the S-polynomial of p1 and p2
    960 * and computes the ecart under the assumtion that
    961 * the last term of the S-polynomial is the greatest
    962 * do not destroy p1 and p2
    963 */
    964 /*
    965 *poly spGSpolyShortMora(poly p1, poly p2, int *ecart)
    966 *{
    967 *  poly p, q;
    968 *
    969 *  p = spGSpolyShortBba(p1, p2, ecart);
    970 *  *ecart = 0;
    971 *  if(p)
    972 *  {
    973 *    if(spNoether==NULL)
    974 *    {
    975 *      q = spGSpolyLast(p1, p2);
    976 *      *ecart = pFDeg(q) - pFDeg(p);
    977 *      pFree1(q);
    978 *      return p;
    979 *    }
    980 *    if (pComp(p, spNoether) == -1)
    981 *    {
    982 *      pFree1(p);
    983 *      return NULL;
    984 *    }
    985 *    q = spGSpolyLast(p1, p2);
    986 *    if (pComp(q, spNoether) == -1)
    987 *      *ecart = pFDeg(spNoether) - pFDeg(p);
    988 *    else
    989 *      *ecart = pFDeg(q) - pFDeg(p);
    990 *    pFree1(q);
    991 *  }
    992 *  return p;
    993 *}
    994 */
Note: See TracChangeset for help on using the changeset viewer.