Changeset d84a4d in git


Ignore:
Timestamp:
Sep 8, 2011, 9:11:36 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '52dcfddee5ec87d404d5e0fb44f2d627608208f1')
Children:
f7aa4c7c61207b077fe954f2e563ca261edcc109
Parents:
38fc1817a82ba6eed7f9f6355cfa06e1e00e1872
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-09-08 21:11:36+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:12:37+01:00
Message:
FIX: id[^_]* vs id_*: adding inline version to kernel/ideals.h
FIX: exposing id_{InsertPolyWithTests,QHomWeight}
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r38fc181 rd84a4d  
    540540static BOOLEAN jjPOWER_ID(leftv res, leftv u, leftv v)
    541541{
    542   res->data = (char *)idPower((ideal)(u->Data()),(int)(long)(v->Data()));
     542  res->data = (char *)id_Power((ideal)(u->Data()),(int)(long)(v->Data()), currRing);
    543543  if (u!=NULL) return jjOP_REST(res,u,v);
    544544  return FALSE;
     
    23142314  pLmDelete(p);
    23152315  if (d==1)
    2316     res->data = (char *)idHomogen((ideal)u->Data(),i);
     2316    res->data = (char *)id_Homogen((ideal)u->Data(), i, currRing);
    23172317  else
    23182318    WerrorS("variable must have weight 1");
     
    55795579  pLmDelete(p);
    55805580  if (d==1)
    5581     res->data = (char *)idHomogen((ideal)u->Data(),i);
     5581    res->data = (char *)id_Homogen((ideal)u->Data(), i, currRing);
    55825582  else
    55835583    WerrorS("variable must have weight 1");
  • Singular/ipshell.cc

    r38fc181 rd84a4d  
    27952795BOOLEAN kQHWeight(leftv res,leftv v)
    27962796{
    2797   res->data=(char *)idQHomWeight((ideal)v->Data());
     2797  res->data=(char *)id_QHomWeight((ideal)v->Data(), currRing);
    27982798  if (res->data==NULL)
    27992799    res->data=(char *)new intvec(rVar(currRing));
     
    44224422      {
    44234423        test_id->m[0]=gls->m[j];
    4424         intvec *dummy_w=idQHomWeight(test_id);
     4424        intvec *dummy_w=id_QHomWeight(test_id, currRing);
    44254425        if (dummy_w!=NULL)
    44264426        {
  • kernel/ideals.h

    r38fc181 rd84a4d  
    1919
    2020
    21 ideal idCopyFirstK (const ideal ide, const int k);
     21inline ideal idCopyFirstK (const ideal ide, const int k, ring R = currRing)
     22{
     23  return id_CopyFirstK(ide, k, R);
     24}
    2225
    2326/// delete an ideal
     
    3437//int id_PosConstant(ideal id, const ring r)
    3538#define idPosConstant(I) id_PosConstant(I,currRing)
    36 //
     39
    3740/// Count the effective size of an ideal
    3841/// (without the trailing allocated zero-elements)
    39 static inline int idSize(const ideal id, const ring r = currRing)
     42static inline int idSize(const ideal id)
    4043{
    4144  int j = IDELEMS(id) - 1;
     
    9396
    9497
    95 ideal idAdd (ideal h1,ideal h2);
    96   /* h1 + h2 */
    97 BOOLEAN idInsertPoly (ideal h1,poly h2);
    98   /* h1 + h2 */
    99 BOOLEAN idInsertPolyWithTests (ideal h1, const int validEntries,
    100   const poly h2, const bool zeroOk, const bool duplicateOk);
    101   /* h1 + h2 */
    102 ideal idMult (ideal h1,ideal h2);
    103   /*hh := h1 * h2*/
     98/// h1 + h2
     99inline ideal idAdd (ideal h1, ideal h2, const ring R = currRing)
     100{
     101  return id_Add(h1, h2, R);
     102}
     103
     104BOOLEAN idInsertPoly (ideal h1,poly h2);  /* h1 + h2 */
     105inline BOOLEAN idInsertPolyWithTests (ideal h1, const int validEntries, const poly h2, const bool zeroOk, const bool duplicateOk, const ring R = currRing)
     106{
     107  return id_InsertPolyWithTests (h1, validEntries, h2, zeroOk, duplicateOk, R);
     108}
     109
     110
     111/* h1 + h2 */
     112
     113/// hh := h1 * h2
     114inline ideal idMult (ideal h1, ideal h2, const ring R = currRing)
     115{
     116  return id_Mult(h1, h2, R);
     117}
    104118
    105119BOOLEAN idIs0 (ideal h);
     
    107121// returns TRUE, if idRankFreeModule(m) > 0
    108122BOOLEAN idIsModule(ideal m, const ring r);
    109 BOOLEAN idHomIdeal (ideal id, ideal Q=NULL);
    110 BOOLEAN idHomModule(ideal m, ideal Q,intvec **w);
     123
     124inline BOOLEAN idHomIdeal (ideal id, ideal Q=NULL, const ring R = currRing)
     125{
     126  return id_HomIdeal(id, Q, R);
     127}
     128
     129inline BOOLEAN idHomModule(ideal m, ideal Q,intvec **w, const ring R = currRing)
     130{
     131   return id_HomModule(m, Q, w, R);
     132}
     133
    111134BOOLEAN idTestHomModule(ideal m, ideal Q, intvec *w);
    112135
     
    146169                BOOLEAN h1IsStb=FALSE, BOOLEAN resultIsIdeal=FALSE);
    147170
    148 ideal   idPower(ideal gid,int deg);
     171// ideal   idPower(ideal gid,int deg);
    149172
    150173//ideal   idElimination (ideal h1,poly delVar);
     
    158181ideal   idHead(ideal h);
    159182
    160 ideal   idHomogen(ideal h, int varnum);
     183// ideal   idHomogen(ideal h, int varnum);
    161184
    162185BOOLEAN idIsSubModule(ideal id1,ideal id2);
     
    167190}
    168191
    169 ideal   idMatrix2Module(matrix mat);
    170 
    171 matrix  idModule2Matrix(ideal mod);
    172 
    173 matrix  idModule2formatedMatrix(ideal mod,int rows, int cols);
     192inline ideal   idMatrix2Module(matrix mat, const ring R = currRing)
     193{
     194  return idMatrix2Module(mat, R);
     195}
     196
     197inline matrix  idModule2Matrix(ideal mod, const ring R = currRing)
     198{
     199  return id_Module2Matrix(mod, R);
     200}
     201inline matrix  idModule2formatedMatrix(ideal mod, int rows, int cols, const ring R = currRing)
     202{
     203  return id_Module2formatedMatrix(mod, rows, cols, R);
     204}
    174205
    175206ideal   idSubst(ideal i, int n, poly e);
    176207
    177 ideal   idJet(ideal i,int d);
    178 ideal   idJetW(ideal i,int d, intvec * iv);
     208inline ideal   idJet(ideal i, int d, const ring R = currRing)
     209{
     210  return id_Jet(i, d, R);
     211}
     212
     213inline ideal   idJetW(ideal i,int d, intvec * iv, const ring R = currRing)
     214{
     215  return id_JetW(i, d, iv, R);
     216}
    179217ideal   idSeries(int n,ideal M,matrix U=NULL,intvec *w=NULL);
    180218
    181 BOOLEAN idIsZeroDim(ideal i);
     219inline BOOLEAN idIsZeroDim(ideal i, const ring R = currRing)
     220{
     221  return idIsZeroDim(i, R);
     222}
     223
    182224matrix  idDiff(matrix i, int k);
    183225matrix  idDiffOp(ideal I, ideal J,BOOLEAN multiply=TRUE);
    184226
    185 intvec *idSort(ideal id,BOOLEAN nolex=TRUE);
     227inline intvec *idSort(ideal id,BOOLEAN nolex=TRUE, const ring R = currRing)
     228{
     229  return id_Sort(id, nolex, R);
     230}
     231
    186232ideal   idModulo (ideal h1,ideal h2, tHomog h=testHomog, intvec ** w=NULL);
    187233matrix  idCoeffOfKBase(ideal arg, ideal kbase, poly how);
    188 // transpose a module
    189 ideal   idTransp(ideal a);
    190 // version of "ideal idTransp(ideal)" which works within a given ring.
    191 ideal id_Transp(ideal a, const ring rRing);
    192 
    193 intvec *idQHomWeight(ideal id);
     234
     235/// transpose a module
     236inline ideal   idTransp(ideal a, const ring R = currRing)
     237{
     238  return id_Transp(a, R);
     239}
     240
     241// intvec *idQHomWeight(ideal id);
    194242
    195243ideal idXXX (ideal  h1, int k);
     
    202250
    203251ideal id_TensorModuleMult(const int m, const ideal M, const ring rRing); // image of certain map for BGG
     252
     253
    204254#endif
  • libpolys/polys/simpleideals.h

    r38fc181 rd84a4d  
    131131
    132132
     133/// insert h2 into h1 depending on the two boolean parameters:
     134/// - if zeroOk is true, then h2 will also be inserted when it is zero
     135/// - if duplicateOk is true, then h2 will also be inserted when it is
     136///   already present in h1
     137/// return TRUE iff h2 was indeed inserted
     138BOOLEAN id_InsertPolyWithTests (ideal h1, const int validEntries,
     139                                const poly h2, const bool zeroOk,
     140                                const bool duplicateOk, const ring r);
     141
     142
     143intvec * id_QHomWeight(ideal id, const ring r);
     144
     145
    133146#endif
Note: See TracChangeset for help on using the changeset viewer.