Changeset 526e40d in git


Ignore:
Timestamp:
Apr 11, 2011, 3:22:53 PM (13 years ago)
Author:
Mohamed Barakat <mohamed.barakat@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'fc741b6502fd8a97288eaa3eba6e5220f3c3df87')
Children:
16733868763266ec04dae72db238bced32663735
Parents:
e1375d3317dc56c03a4c242a459ec4e46e17f1cd
git-author:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-04-11 13:22:53+00:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-04-11 13:22:53+00:00
Message:
collect denominators of std computations in denom_list
call system("denom_list");

From: Mohamed Barakat <mohamed.barakat@rwth-aachen.de>

git-svn-id: file:///usr/local/Singular/svn/trunk@14135 2c84dea3-7e68-4137-9b89-c4e89433aadc
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • Singular/Makefile.in

    re1375d r526e40d  
    221221    MinorInterface.cc \
    222222    bigintm.cc pyobject_setup.cc \
    223     bbcone.cc bbfan.cc
     223    bbcone.cc bbfan.cc denom_list.cc
    224224
    225225# stuff for MP
  • Singular/extra.cc

    re1375d r526e40d  
    37233723  else
    37243724#endif
     3725    if (strcmp(sys_cmd,"denom_list")==0)
     3726      {
     3727        res->rtyp=LIST_CMD;
     3728        extern lists get_denom_list();
     3729        res->data=(lists)get_denom_list();
     3730        return FALSE;
     3731      }
    37253732/*==================== Error =================*/
    37263733      Werror( "(extended) system(\"%s\",...) %s", sys_cmd, feNotImplemented );
  • kernel/kInline.cc

    re1375d r526e40d  
    1919#include <kernel/kbuckets.h>
    2020#include <omalloc/omalloc.h>
     21#include <kernel/options.h>
    2122
    2223#define HAVE_TAIL_BIN
     
    423424{
    424425  assume(p != NULL);
    425   if (t_p != NULL)
    426   {
    427     p_Cleardenom(t_p, tailRing);
    428     pSetCoeff0(p, pGetCoeff(t_p));
    429   }
    430   else
    431   {
    432     #ifdef HAVE_RATGRING
    433     p= p_Cleardenom(p, currRing);
    434     #else
    435     p_Cleardenom(p, currRing);
    436     #endif
    437   }
     426  if (TEST_OPT_CONTENTSB)
     427    {
     428      number n;
     429      if (t_p != NULL)
     430        {
     431          p_Cleardenom_n(t_p, tailRing, n);
     432          pSetCoeff0(p, pGetCoeff(t_p));
     433        }
     434      else
     435        {
     436#ifdef HAVE_RATGRING
     437          p= p_Cleardenom_n(p, currRing, n);
     438#else
     439          p_Cleardenom_n(p, currRing, n);
     440#endif
     441        }
     442      if (!nIsOne(n))
     443        {
     444          denominator_list denom=(denominator_list)omAlloc(sizeof(denominator_list_s));
     445          denom->n=nInvers(n);
     446          denom->next=DENOMINATOR_LIST;
     447          DENOMINATOR_LIST=denom;
     448        }
     449      nDelete(&n);
     450    }
     451  else
     452    {
     453      if (t_p != NULL)
     454        {
     455          p_Cleardenom(t_p, tailRing);
     456          pSetCoeff0(p, pGetCoeff(t_p));
     457        }
     458      else
     459        {
     460#ifdef HAVE_RATGRING
     461          p= p_Cleardenom(p, currRing);
     462#else
     463          p_Cleardenom(p, currRing);
     464#endif
     465        }
     466    }
    438467}
    439468
  • kernel/kutil.cc

    re1375d r526e40d  
    7070#define KDEBUG 2
    7171#endif
     72
     73denominator_list DENOMINATOR_LIST=NULL;
    7274
    7375
     
    53995401            if (TEST_OPT_INTSTRATEGY)
    54005402            {
    5401               //pContent(strat->S[i]);
    5402               strat->S[i]=p_Cleardenom(strat->S[i], currRing);// also does a pContent
     5403              if (TEST_OPT_CONTENTSB)
     5404                {
     5405                  number n;
     5406                  p_Cleardenom_n(strat->S[i], currRing, n);// also does a pContent
     5407                  if (!nIsOne(n))
     5408                    {
     5409                      denominator_list denom=(denominator_list)omAlloc(sizeof(denominator_list_s));
     5410                      denom->n=nInvers(n);
     5411                      denom->next=DENOMINATOR_LIST;
     5412                      DENOMINATOR_LIST=denom;
     5413                    }
     5414                  nDelete(&n);
     5415                }
     5416              else
     5417                {
     5418                  //pContent(strat->S[i]);
     5419                  strat->S[i]=p_Cleardenom(strat->S[i], currRing);// also does a pContent
     5420                }
    54035421            }
    54045422            else
     
    54705488            if (TEST_OPT_INTSTRATEGY)
    54715489            {
    5472               strat->S[i]=p_Cleardenom(strat->S[i], currRing);// also does a pContent
     5490              if (TEST_OPT_CONTENTSB)
     5491                {
     5492                  number n;
     5493                  p_Cleardenom_n(strat->S[i], currRing, n);// also does a pContent
     5494                  if (!nIsOne(n))
     5495                    {
     5496                      denominator_list denom=(denominator_list)omAlloc(sizeof(denominator_list_s));
     5497                      denom->n=nInvers(n);
     5498                      denom->next=DENOMINATOR_LIST;
     5499                      DENOMINATOR_LIST=denom;
     5500                    }
     5501                  nDelete(&n);
     5502                }
     5503              else
     5504                {
     5505                  //pContent(strat->S[i]);
     5506                  strat->S[i]=p_Cleardenom(strat->S[i], currRing);// also does a pContent
     5507                }
    54735508            }
    54745509            else
     
    61216156        strat->S[i] = redtail(strat->S[i], strat->sl, strat);
    61226157      if (TEST_OPT_INTSTRATEGY)
    6123         strat->S[i]=p_Cleardenom(strat->S[i], currRing);
     6158        {
     6159          if (TEST_OPT_CONTENTSB)
     6160            {
     6161              number n;
     6162              p_Cleardenom_n(strat->S[i], currRing, n);// also does a pContent
     6163              if (!nIsOne(n))
     6164                {
     6165                  denominator_list denom=(denominator_list)omAlloc(sizeof(denominator_list_s));
     6166                  denom->n=nInvers(n);
     6167                  denom->next=DENOMINATOR_LIST;
     6168                  DENOMINATOR_LIST=denom;
     6169                }
     6170              nDelete(&n);
     6171            }
     6172          else
     6173            {
     6174              //pContent(strat->S[i]);
     6175              strat->S[i]=p_Cleardenom(strat->S[i], currRing);// also does a pContent
     6176            }
     6177        }
    61246178    }
    61256179    if (TEST_OPT_PROT)
  • kernel/kutil.h

    re1375d r526e40d  
    5555typedef TObject * TSet;
    5656typedef LObject * LSet;
     57
     58typedef struct denominator_list_s denominator_list_s;
     59typedef denominator_list_s *denominator_list;
     60
     61struct denominator_list_s{number n; denominator_list next;};
     62extern denominator_list DENOMINATOR_LIST;
    5763
    5864class sTObject
  • kernel/polys1.cc

    re1375d r526e40d  
    515515  poly p;
    516516
    517   if(TEST_OPT_CONTENTSB) return;
     517  //  if(TEST_OPT_CONTENTSB) return;
    518518  if(pNext(ph)==NULL)
    519519  {
     
    657657void pSimpleContent(poly ph,int smax)
    658658{
    659   if(TEST_OPT_CONTENTSB) return;
     659  //if(TEST_OPT_CONTENTSB) return;
    660660  if (ph==NULL) return;
    661661  if (pNext(ph)==NULL)
     
    714714#if 0
    715715{
    716   assume(!TEST_OPT_CONTENTSB);
     716  //assume(!TEST_OPT_CONTENTSB);
    717717  assume(ph!=NULL);
    718718  assume(pNext(ph)!=NULL);
     
    966966  if(pNext(p)==NULL)
    967967  {
     968    /*
    968969    if (TEST_OPT_CONTENTSB)
    969970    {
     
    978979    }
    979980    else
     981    */
    980982      pSetCoeff(p,nInit(1));
    981983  }
Note: See TracChangeset for help on using the changeset viewer.