Changeset 4a09a00 in git


Ignore:
Timestamp:
Feb 8, 2019, 8:11:24 PM (5 years ago)
Author:
Karim Abou Zeid <karim23697@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd25190065115c859833252500a64cfb7b11e3a50')
Children:
d5fcba8fae30acf6781eaf2d23634e3cd1cf7f75
Parents:
d7374296d68df54ed75ea422d5c63f4a4e2bd11c
git-author:
Karim Abou Zeid <karim23697@gmail.com>2019-02-08 20:11:24+01:00
git-committer:
Karim Abou Zeid <karim23697@gmail.com>2019-02-08 20:36:18+01:00
Message:
rightstd system call
Location:
Singular
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Singular/dyn_modules/freealgebra/freealgebra.cc

    rd737429 r4a09a00  
    124124  else return TRUE;
    125125}
    126 
    127 static BOOLEAN rightStd(leftv res, leftv h)
    128 {
    129   const short t[]={1,IDEAL_CMD};
    130   if (iiCheckTypes(h,t,1))
    131   {
    132     ideal id=(ideal)h->Data();
    133     res->rtyp = IDEAL_CMD;
    134     res->data = rightgb(id, currRing->qideal);
    135     return FALSE;
    136   }
    137   return TRUE;
    138 }
    139126#endif
    140127
     
    149136  p->iiAddCproc("freealgebra.so","stest",TRUE,stest);
    150137  p->iiAddCproc("freealgebra.so","btest",TRUE,btest);
    151   p->iiAddCproc("freealgebra.so","rightstd",FALSE,rightStd);
    152138#endif
    153139  return (MAX_TOK);
  • Singular/iparith.cc

    rd737429 r4a09a00  
    4444#include "kernel/GBEngine/syz.h"
    4545#include "kernel/GBEngine/kstd1.h"
     46#include "kernel/GBEngine/kutil.h"
    4647#include "kernel/GBEngine/units.h"
    4748#include "kernel/GBEngine/tgb.h"
     
    51165117}
    51175118#endif
    5118 
     5119#ifdef HAVE_SHIFTBBA // do not place above jjSTD in this file because we need to reference it
     5120static BOOLEAN jjRIGHTSTD(leftv res, leftv v)
     5121{
     5122  if (rIsLPRing(currRing))
     5123  {
     5124    if (rField_is_numeric(currRing))
     5125      WarnS("groebner base computations with inexact coefficients can not be trusted due to rounding errors");
     5126    ideal result;
     5127    ideal v_id=(ideal)v->Data();
     5128    /* intvec *w=(intvec *)atGet(v,"isHomog",INTVEC_CMD); */
     5129    /* tHomog hom=testHomog; */
     5130    /* if (w!=NULL) */
     5131    /* { */
     5132    /*   if (!idTestHomModule(v_id,currRing->qideal,w)) */
     5133    /*   { */
     5134    /*     WarnS("wrong weights"); */
     5135    /*     w=NULL; */
     5136    /*   } */
     5137    /*   else */
     5138    /*   { */
     5139    /*     hom=isHomog; */
     5140    /*     w=ivCopy(w); */
     5141    /*   } */
     5142    /* } */
     5143    /* result=kStd(v_id,currRing->qideal,hom,&w); */
     5144    result = rightgb(v_id, currRing->qideal);
     5145    idSkipZeroes(result);
     5146    res->data = (char *)result;
     5147    if(!TEST_OPT_DEGBOUND) setFlag(res,FLAG_STD);
     5148    /* if (w!=NULL) atSet(res,omStrDup("isHomog"),w,INTVEC_CMD); */
     5149    return FALSE;
     5150  }
     5151  else if (rIsPluralRing(currRing))
     5152  {
     5153    ideal I=(ideal)v->Data();
     5154
     5155    ring A = currRing;
     5156    ring Aopp = rOpposite(A);
     5157    currRing = Aopp;
     5158    ideal Iopp = idOppose(A, I, Aopp);
     5159    ideal Jopp = kStd(Iopp,currRing->qideal,testHomog,NULL);
     5160    currRing = A;
     5161    ideal J = idOppose(Aopp, Jopp, A);
     5162
     5163    id_Delete(&Iopp, Aopp);
     5164    id_Delete(&Jopp, Aopp);
     5165    rDelete(Aopp);
     5166
     5167    idSkipZeroes(J);
     5168    res->data = (char *)J;
     5169    if(!TEST_OPT_DEGBOUND) setFlag(res,FLAG_STD);
     5170    return FALSE;
     5171  }
     5172  else
     5173  {
     5174    return jjSTD(res, v);
     5175  }
     5176}
     5177#endif
    51195178static BOOLEAN jjTYPEOF(leftv res, leftv v)
    51205179{
  • Singular/table.h

    rd737429 r4a09a00  
    245245,{D(jjDUMMY),      RESOLUTION_CMD,  RESOLUTION_CMD, RESOLUTION_CMD, ALLOW_PLURAL |ALLOW_RING}
    246246,{D(jjRESTART),    RESTART_CMD,     NONE,           INT_CMD,        ALLOW_NC |ALLOW_RING}
     247#ifdef HAVE_SHIFTBBA
     248,{D(jjRIGHTSTD),   RIGHTSTD_CMD,    IDEAL_CMD,      IDEAL_CMD     , ALLOW_NC |NO_RING}
     249#endif
    247250,{D(jjRINGLIST),   RINGLIST_CMD,    LIST_CMD,       RING_CMD      , ALLOW_NC |ALLOW_RING}
    248251,{D(jjRINGLIST_C), RING_LIST_CMD,   LIST_CMD,       CRING_CMD     , ALLOW_NC |ALLOW_RING}
     
    11681171  { "return",      0, RETURN ,            RETURN},
    11691172  { "RETURN",      0, END_GRAMMAR ,       RETURN},
     1173#ifdef HAVE_PLURAL
     1174  { "rightstd",    0, RIGHTSTD_CMD ,      CMD_1},
     1175#endif /* HAVE_PLURAL */
    11701176  { "ring",        0, RING_CMD ,          RING_CMD},
    11711177  { "ringlist",    0, RINGLIST_CMD ,      CMD_1},
  • Singular/tok.h

    rd737429 r4a09a00  
    169169  RESTART_CMD,
    170170  RESULTANT_CMD,
     171  RIGHTSTD_CMD,
    171172  RINGLIST_CMD,
    172173  RING_LIST_CMD,
Note: See TracChangeset for help on using the changeset viewer.