Macros | Functions
sparsmat.h File Reference

Go to the source code of this file.

Macros

#define SM_MULT   sm_MultDiv
 
#define SM_DIV   sm_SpecialPolyDiv
 

Functions

poly sm_Mult (poly, poly, const ring)
 
void sm_PolyDiv (poly, poly, const ring)
 
poly sm_MultDiv (poly, poly, const poly, const ring)
 
void sm_SpecialPolyDiv (poly, poly, const ring)
 
poly sm_CallDet (ideal I, const ring)
 
void sm_CallBareiss (ideal smat, int x, int y, ideal &M, intvec **iv, const ring)
 
ideal sm_CallSolv (ideal I, const ring)
 
ring sm_RingChange (const ring, long)
 
void sm_KillModifiedRing (ring r)
 
long sm_ExpBound (ideal, int, int, int, const ring)
 
BOOLEAN sm_CheckDet (ideal, int, BOOLEAN, const ring)
 

Macro Definition Documentation

#define SM_DIV   sm_SpecialPolyDiv

Definition at line 24 of file sparsmat.h.

#define SM_MULT   sm_MultDiv

Definition at line 23 of file sparsmat.h.

Function Documentation

void sm_CallBareiss ( ideal  smat,
int  x,
int  y,
ideal &  M,
intvec **  iv,
const ring   
)

Definition at line 404 of file sparsmat.cc.

405 {
406  int r=id_RankFreeModule(I,R),t=r;
407  int c=IDELEMS(I),s=c;
408  long bound;
409  ring tmpR;
410  sparse_mat *bareiss;
411 
412  if ((x>0) && (x<t))
413  t-=x;
414  if ((y>1) && (y<s))
415  s-=y;
416  if (t>s) t=s;
417  bound=sm_ExpBound(I,c,r,t,R);
418  tmpR=sm_RingChange(R,bound);
419  ideal II = idrCopyR(I, R, tmpR);
420  bareiss = new sparse_mat(II,tmpR);
421  if (bareiss->smGetAct() == NULL)
422  {
423  delete bareiss;
424  *iv=new intvec(1,rVar(tmpR));
425  }
426  else
427  {
428  id_Delete(&II,tmpR);
429  bareiss->smNewBareiss(x, y);
430  II = bareiss->smRes2Mod();
431  *iv = new intvec(bareiss->smGetRed());
432  bareiss->smToIntvec(*iv);
433  delete bareiss;
434  II = idrMoveR(II,tmpR,R);
435  }
436  sm_KillModifiedRing(tmpR);
437  M=II;
438 }
int smGetRed()
Definition: sparsmat.cc:179
const CanonicalForm int s
Definition: facAbsFact.cc:55
ring sm_RingChange(const ring origR, long bound)
Definition: sparsmat.cc:263
const CanonicalForm int const CFList const Variable & y
Definition: facAbsFact.cc:57
static CanonicalForm bound(const CFMatrix &M)
Definition: cf_linsys.cc:460
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:540
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
long sm_ExpBound(ideal m, int di, int ra, int t, const ring currRing)
Definition: sparsmat.cc:194
#define M
Definition: sirandom.c:24
void smNewBareiss(int, int)
Definition: sparsmat.cc:603
const ring r
Definition: syzextra.cc:208
Definition: intvec.h:16
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
ideal idrMoveR(ideal &id, ring src_r, ring dest_r)
Definition: prCopy.cc:249
#define IDELEMS(i)
Definition: simpleideals.h:24
#define NULL
Definition: omList.c:10
ideal smRes2Mod()
Definition: sparsmat.cc:505
void sm_KillModifiedRing(ring r)
Definition: sparsmat.cc:294
#define R
Definition: sirandom.c:26
Variable x
Definition: cfModGcd.cc:4023
ideal idrCopyR(ideal id, ring src_r, ring dest_r)
Definition: prCopy.cc:193
void smToIntvec(intvec *)
Definition: sparsmat.cc:518
smpoly * smGetAct()
Definition: sparsmat.cc:178
poly sm_CallDet ( ideal  I,
const ring   
)

Definition at line 359 of file sparsmat.cc.

360 {
361  if (I->ncols != I->rank)
362  {
363  Werror("det of %ld x %d module (matrix)",I->rank,I->ncols);
364  return NULL;
365  }
366  int r=id_RankFreeModule(I,R);
367  if (I->ncols != r) // some 0-lines at the end
368  {
369  return NULL;
370  }
371  long bound=sm_ExpBound(I,r,r,r,R);
372  number diag,h=n_Init(1,R->cf);
373  poly res;
374  ring tmpR;
375  sparse_mat *det;
376  ideal II;
377 
378  tmpR=sm_RingChange(R,bound);
379  II = idrCopyR(I, R, tmpR);
380  diag = sm_Cleardenom(II,tmpR);
381  det = new sparse_mat(II,tmpR);
382  id_Delete(&II,tmpR);
383  if (det->smGetAct() == NULL)
384  {
385  delete det;
386  sm_KillModifiedRing(tmpR);
387  return NULL;
388  }
389  res=det->smDet();
390  if(det->smGetSign()<0) res=p_Neg(res,tmpR);
391  delete det;
392  res = prMoveR(res, tmpR, R);
393  sm_KillModifiedRing(tmpR);
394  if (!n_Equal(diag,h,R->cf))
395  {
396  p_Mult_nn(res,diag,R);
397  p_Normalize(res,R);
398  }
399  n_Delete(&diag,R->cf);
400  n_Delete(&h,R->cf);
401  return res;
402 }
ring sm_RingChange(const ring origR, long bound)
Definition: sparsmat.cc:263
static CanonicalForm bound(const CFMatrix &M)
Definition: cf_linsys.cc:460
int smGetSign()
Definition: sparsmat.cc:177
poly prMoveR(poly &p, ring src_r, ring dest_r)
Definition: prCopy.cc:91
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
Definition: coeffs.h:539
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
static number sm_Cleardenom(ideal, const ring)
Definition: sparsmat.cc:2276
long sm_ExpBound(ideal m, int di, int ra, int t, const ring currRing)
Definition: sparsmat.cc:194
poly res
Definition: myNF.cc:322
const ring r
Definition: syzextra.cc:208
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
static poly p_Mult_nn(poly p, number n, const ring r)
Definition: p_polys.h:902
void p_Normalize(poly p, const ring r)
Definition: p_polys.cc:3621
#define NULL
Definition: omList.c:10
void sm_KillModifiedRing(ring r)
Definition: sparsmat.cc:294
#define R
Definition: sirandom.c:26
poly smDet()
Definition: sparsmat.cc:529
static FORCE_INLINE BOOLEAN n_Equal(number a, number b, const coeffs r)
TRUE iff 'a' and 'b' represent the same number; they may have different representations.
Definition: coeffs.h:461
ideal idrCopyR(ideal id, ring src_r, ring dest_r)
Definition: prCopy.cc:193
static poly p_Neg(poly p, const ring r)
Definition: p_polys.h:1018
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition: coeffs.h:456
polyrec * poly
Definition: hilb.h:10
static Poly * h
Definition: janet.cc:978
void Werror(const char *fmt,...)
Definition: reporter.cc:199
smpoly * smGetAct()
Definition: sparsmat.cc:178
ideal sm_CallSolv ( ideal  I,
const ring   
)

Definition at line 2369 of file sparsmat.cc.

2370 {
2371  sparse_number_mat *linsolv;
2372  ring tmpR;
2373  ideal rr;
2374 
2375  if (id_IsConstant(I,R)==FALSE)
2376  {
2377  WerrorS("symbol in equation");
2378  return NULL;
2379  }
2380  I->rank = id_RankFreeModule(I,R);
2381  if (smCheckSolv(I)) return NULL;
2382  tmpR=sm_RingChange(R,1);
2383  rr=idrCopyR(I,R, tmpR);
2384  linsolv = new sparse_number_mat(rr,tmpR);
2385  rr=NULL;
2386  linsolv->smTriangular();
2387  if (linsolv->smIsSing() == 0)
2388  {
2389  linsolv->smSolv();
2390  rr = linsolv->smRes2Ideal();
2391  }
2392  else
2393  WerrorS("singular problem for linsolv");
2394  delete linsolv;
2395  if (rr!=NULL)
2396  rr = idrMoveR(rr,tmpR,R);
2397  sm_KillModifiedRing(tmpR);
2398  return rr;
2399 }
ring sm_RingChange(const ring origR, long bound)
Definition: sparsmat.cc:263
#define FALSE
Definition: auxiliary.h:140
ideal smRes2Ideal()
Definition: sparsmat.cc:2559
BOOLEAN id_IsConstant(ideal id, const ring r)
test if the ideal has only constant polynomials NOTE: zero ideal/module is also constant ...
void WerrorS(const char *s)
Definition: feFopen.cc:23
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
static BOOLEAN smCheckSolv(ideal)
Definition: sparsmat.cc:2942
ideal idrMoveR(ideal &id, ring src_r, ring dest_r)
Definition: prCopy.cc:249
#define NULL
Definition: omList.c:10
void sm_KillModifiedRing(ring r)
Definition: sparsmat.cc:294
#define R
Definition: sirandom.c:26
ideal idrCopyR(ideal id, ring src_r, ring dest_r)
Definition: prCopy.cc:193
BOOLEAN sm_CheckDet ( ideal  ,
int  ,
BOOLEAN  ,
const ring   
)

Definition at line 308 of file sparsmat.cc.

309 {
310  int s,t,i;
311  poly p;
312 
313  if (d>100)
314  return sw;
315  if (!rField_is_Q(r))
316  return sw;
317  s = t = 0;
318  if (sw)
319  {
320  for(i=IDELEMS(I)-1;i>=0;i--)
321  {
322  p=I->m[i];
323  if (p!=NULL)
324  {
325  if(!p_IsConstant(p,r))
326  return sw;
327  s++;
328  t+=n_Size(pGetCoeff(p),r->cf);
329  }
330  }
331  }
332  else
333  {
334  for(i=IDELEMS(I)-1;i>=0;i--)
335  {
336  p=I->m[i];
337  if (!p_IsConstantPoly(p,r))
338  return sw;
339  while (p!=NULL)
340  {
341  s++;
342  t+=n_Size(pGetCoeff(p),r->cf);
343  pIter(p);
344  }
345  }
346  }
347  s*=15;
348  if (t>s)
349  return !sw;
350  else
351  return sw;
352 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
return P p
Definition: myNF.cc:203
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
Definition: monomials.h:51
#define pIter(p)
Definition: monomials.h:44
const ring r
Definition: syzextra.cc:208
static BOOLEAN p_IsConstant(const poly p, const ring r)
Definition: p_polys.h:1784
int i
Definition: cfEzgcd.cc:123
static BOOLEAN rField_is_Q(const ring r)
Definition: ring.h:461
#define IDELEMS(i)
Definition: simpleideals.h:24
#define NULL
Definition: omList.c:10
static BOOLEAN p_IsConstantPoly(const poly p, const ring r)
Definition: p_polys.h:1798
polyrec * poly
Definition: hilb.h:10
static FORCE_INLINE int n_Size(number n, const coeffs r)
return a non-negative measure for the complexity of n; return 0 only when n represents zero; (used fo...
Definition: coeffs.h:571
long sm_ExpBound ( ideal  ,
int  ,
int  ,
int  ,
const ring   
)

Definition at line 194 of file sparsmat.cc.

195 {
196  poly p;
197  long kr, kc;
198  long *r, *c;
199  int al, bl, i, j, k;
200 
201  if (ra==0) ra=1;
202  al = di*sizeof(long);
203  c = (long *)omAlloc(al);
204  bl = ra*sizeof(long);
205  r = (long *)omAlloc0(bl);
206  for (i=di-1;i>=0;i--)
207  {
208  kc = 0;
209  p = m->m[i];
210  while(p!=NULL)
211  {
212  k = p_GetComp(p, currRing)-1;
213  kr = r[k];
214  for (j=rVar(currRing);j>0;j--)
215  {
216  if(p_GetExp(p,j, currRing)>kc)
217  kc=p_GetExp(p,j, currRing);
218  if(p_GetExp(p,j, currRing)>kr)
219  kr=p_GetExp(p,j, currRing);
220  }
221  r[k] = kr;
222  pIter(p);
223  }
224  c[i] = kc;
225  }
226  if (t<di) smMinSelect(c, t, di);
227  if (t<ra) smMinSelect(r, t, ra);
228  kr = kc = 0;
229  for (j=t-1;j>=0;j--)
230  {
231  kr += r[j];
232  kc += c[j];
233  }
234  omFreeSize((ADDRESS)c, al);
235  omFreeSize((ADDRESS)r, bl);
236  if (kr<kc) kc = kr;
237  if (kr<1) kr = 1;
238  return kr;
239 }
return P p
Definition: myNF.cc:203
#define p_GetComp(p, r)
Definition: monomials.h:72
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:540
void * ADDRESS
Definition: auxiliary.h:161
int k
Definition: cfEzgcd.cc:93
#define omAlloc(size)
Definition: omAllocDecl.h:210
#define pIter(p)
Definition: monomials.h:44
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
const ring r
Definition: syzextra.cc:208
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent : the integer VarOffset encodes:
Definition: p_polys.h:465
int j
Definition: myNF.cc:70
int m
Definition: cfEzgcd.cc:119
int i
Definition: cfEzgcd.cc:123
#define NULL
Definition: omList.c:10
static void smMinSelect(long *, int, int)
Definition: sparsmat.cc:241
polyrec * poly
Definition: hilb.h:10
#define omAlloc0(size)
Definition: omAllocDecl.h:211
void sm_KillModifiedRing ( ring  r)

Definition at line 294 of file sparsmat.cc.

295 {
296  if (r->qideal!=NULL) id_Delete(&(r->qideal),r);
298 }
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
const ring r
Definition: syzextra.cc:208
#define NULL
Definition: omList.c:10
void rKillModifiedRing(ring r)
Definition: ring.cc:2962
poly sm_Mult ( poly  ,
poly  ,
const ring   
)
poly sm_MultDiv ( poly  ,
poly  ,
const poly  ,
const ring   
)

Definition at line 1812 of file sparsmat.cc.

1813 {
1814  poly pa, e, res, r;
1815  BOOLEAN lead;
1816 
1817  if ((c == NULL) || p_LmIsConstantComp(c,R))
1818  {
1819  return pp_Mult_qq(a, b, R);
1820  }
1821  if (smSmaller(a, b))
1822  {
1823  r = a;
1824  a = b;
1825  b = r;
1826  }
1827  res = NULL;
1828  e = p_Init(R);
1829  lead = FALSE;
1830  while (!lead)
1831  {
1832  pSetCoeff0(e,pGetCoeff(b));
1833  if (sm_IsNegQuot(e, b, c, R))
1834  {
1835  lead = p_LmDivisibleByNoComp(e, a, R);
1836  r = sm_SelectCopy_ExpMultDiv(a, e, b, c, R);
1837  }
1838  else
1839  {
1840  lead = TRUE;
1841  r = pp_Mult_mm(a, e,R);
1842  }
1843  if (lead)
1844  {
1845  if (res != NULL)
1846  {
1847  sm_FindRef(&pa, &res, r, R);
1848  if (pa == NULL)
1849  lead = FALSE;
1850  }
1851  else
1852  {
1853  pa = res = r;
1854  }
1855  }
1856  else
1857  res = p_Add_q(res, r, R);
1858  pIter(b);
1859  if (b == NULL)
1860  {
1861  p_LmFree(e, R);
1862  return res;
1863  }
1864  }
1865  do
1866  {
1867  pSetCoeff0(e,pGetCoeff(b));
1868  if (sm_IsNegQuot(e, b, c, R))
1869  {
1870  r = sm_SelectCopy_ExpMultDiv(a, e, b, c, R);
1871  if (p_LmDivisibleByNoComp(e, a,R))
1872  sm_CombineChain(&pa, r, R);
1873  else
1874  pa = p_Add_q(pa,r,R);
1875  }
1876  else
1877  {
1878  r = pp_Mult_mm(a, e, R);
1879  sm_CombineChain(&pa, r, R);
1880  }
1881  pIter(b);
1882  } while (b != NULL);
1883  p_LmFree(e, R);
1884  return res;
1885 }
static BOOLEAN p_LmIsConstantComp(const poly p, const ring r)
Definition: p_polys.h:937
const poly a
Definition: syzextra.cc:212
#define FALSE
Definition: auxiliary.h:140
static BOOLEAN p_LmDivisibleByNoComp(poly a, poly b, const ring r)
Definition: p_polys.h:1662
static BOOLEAN smSmaller(poly, poly)
Definition: sparsmat.cc:2015
static poly pp_Mult_mm(poly p, poly m, const ring r)
Definition: p_polys.h:962
#define TRUE
Definition: auxiliary.h:144
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
Definition: monomials.h:51
static void p_LmFree(poly p, ring)
Definition: p_polys.h:679
#define pIter(p)
Definition: monomials.h:44
poly res
Definition: myNF.cc:322
const ring r
Definition: syzextra.cc:208
static void sm_FindRef(poly *, poly *, poly, const ring)
Definition: sparsmat.cc:2073
static poly pp_Mult_qq(poly p, poly q, const ring r)
Definition: p_polys.h:1075
#define NULL
Definition: omList.c:10
static void sm_CombineChain(poly *, poly, const ring)
Definition: sparsmat.cc:2026
#define R
Definition: sirandom.c:26
#define pSetCoeff0(p, n)
Definition: monomials.h:67
polyrec * poly
Definition: hilb.h:10
static poly p_Add_q(poly p, poly q, const ring r)
Definition: p_polys.h:884
static poly sm_SelectCopy_ExpMultDiv(poly p, poly m, poly a, poly b, const ring currRing)
Definition: sparsmat.cc:104
int BOOLEAN
Definition: auxiliary.h:131
static poly p_Init(const ring r, omBin bin)
Definition: p_polys.h:1248
const poly b
Definition: syzextra.cc:213
static BOOLEAN sm_IsNegQuot(poly, const poly, const poly, const ring)
Definition: sparsmat.cc:1959
void sm_PolyDiv ( poly  ,
poly  ,
const ring   
)

Definition at line 1613 of file sparsmat.cc.

1614 {
1615  const number x = pGetCoeff(b);
1616  number y, yn;
1617  poly t, h, dummy;
1618  int i;
1619 
1620  if (pNext(b) == NULL)
1621  {
1622  do
1623  {
1624  if (!p_LmIsConstantComp(b,R))
1625  {
1626  for (i=rVar(R); i; i--)
1627  p_SubExp(a,i,p_GetExp(b,i,R),R);
1628  p_Setm(a,R);
1629  }
1630  y = n_Div(pGetCoeff(a),x,R->cf);
1631  n_Normalize(y,R->cf);
1632  p_SetCoeff(a,y,R);
1633  pIter(a);
1634  } while (a != NULL);
1635  return;
1636  }
1637  dummy = p_Init(R);
1638  do
1639  {
1640  for (i=rVar(R); i; i--)
1641  p_SubExp(a,i,p_GetExp(b,i,R),R);
1642  p_Setm(a,R);
1643  y = n_Div(pGetCoeff(a),x,R->cf);
1644  n_Normalize(y,R->cf);
1645  p_SetCoeff(a,y,R);
1646  yn = n_InpNeg(n_Copy(y,R->cf),R->cf);
1647  t = pNext(b);
1648  h = dummy;
1649  do
1650  {
1651  h = pNext(h) = p_Init(R);
1652  //pSetComp(h,0);
1653  for (i=rVar(R); i; i--)
1654  p_SetExp(h,i,p_GetExp(a,i,R)+p_GetExp(t,i,R),R);
1655  p_Setm(h,R);
1656  pSetCoeff0(h,n_Mult(yn, pGetCoeff(t),R->cf));
1657  pIter(t);
1658  } while (t != NULL);
1659  n_Delete(&yn,R->cf);
1660  pNext(h) = NULL;
1661  a = pNext(a) = p_Add_q(pNext(a), pNext(dummy),R);
1662  } while (a!=NULL);
1663  p_LmFree(dummy, R);
1664 }
const CanonicalForm int const CFList const Variable & y
Definition: facAbsFact.cc:57
static BOOLEAN p_LmIsConstantComp(const poly p, const ring r)
Definition: p_polys.h:937
const poly a
Definition: syzextra.cc:212
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:540
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
Definition: coeffs.h:579
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
Definition: monomials.h:51
static number p_SetCoeff(poly p, number n, ring r)
Definition: p_polys.h:401
static void p_LmFree(poly p, ring)
Definition: p_polys.h:679
static long p_SubExp(poly p, int v, long ee, ring r)
Definition: p_polys.h:609
#define pIter(p)
Definition: monomials.h:44
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
Definition: coeffs.h:635
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent : the integer VarOffset encodes:
Definition: p_polys.h:465
static FORCE_INLINE number n_InpNeg(number n, const coeffs r)
in-place negation of n MUST BE USED: n = n_InpNeg(n) (no copy is returned)
Definition: coeffs.h:558
int i
Definition: cfEzgcd.cc:123
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent : VarOffset encodes the position in p->exp
Definition: p_polys.h:484
#define NULL
Definition: omList.c:10
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
Definition: coeffs.h:452
static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
return the quotient of 'a' and 'b', i.e., a/b; raises an error if 'b' is not invertible in r exceptio...
Definition: coeffs.h:615
#define R
Definition: sirandom.c:26
Variable x
Definition: cfModGcd.cc:4023
#define pNext(p)
Definition: monomials.h:43
static void p_Setm(poly p, const ring r)
Definition: p_polys.h:436
#define pSetCoeff0(p, n)
Definition: monomials.h:67
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition: coeffs.h:456
polyrec * poly
Definition: hilb.h:10
static poly p_Add_q(poly p, poly q, const ring r)
Definition: p_polys.h:884
static Poly * h
Definition: janet.cc:978
static poly p_Init(const ring r, omBin bin)
Definition: p_polys.h:1248
const poly b
Definition: syzextra.cc:213
ring sm_RingChange ( const ring  ,
long   
)

Definition at line 263 of file sparsmat.cc.

264 {
265 // *origR =currRing;
266  ring tmpR=rCopy0(origR,FALSE,FALSE);
267  int *ord=(int*)omAlloc0(3*sizeof(int));
268  int *block0=(int*)omAlloc(3*sizeof(int));
269  int *block1=(int*)omAlloc(3*sizeof(int));
270  ord[0]=ringorder_c;
271  ord[1]=ringorder_dp;
272  tmpR->order=ord;
273  tmpR->OrdSgn=1;
274  block0[1]=1;
275  tmpR->block0=block0;
276  block1[1]=tmpR->N;
277  tmpR->block1=block1;
278  tmpR->bitmask = 2*bound;
279  tmpR->wvhdl = (int **)omAlloc0((3) * sizeof(int*));
280 
281 // ???
282 // if (tmpR->bitmask > currRing->bitmask) tmpR->bitmask = currRing->bitmask;
283 
284  rComplete(tmpR,1);
285  if (origR->qideal!=NULL)
286  {
287  tmpR->qideal= idrCopyR_NoSort(origR->qideal, origR, tmpR);
288  }
289  if (TEST_OPT_PROT)
290  Print("[%ld:%d]", (long) tmpR->bitmask, tmpR->ExpL_Size);
291  return tmpR;
292 }
static CanonicalForm bound(const CFMatrix &M)
Definition: cf_linsys.cc:460
#define Print
Definition: emacs.cc:83
#define TEST_OPT_PROT
Definition: options.h:98
#define FALSE
Definition: auxiliary.h:140
#define omAlloc(size)
Definition: omAllocDecl.h:210
BOOLEAN rComplete(ring r, int force)
this needs to be called whenever a new ring is created: new fields in ring are created (like VarOffse...
Definition: ring.cc:3435
ring rCopy0(const ring r, BOOLEAN copy_qideal, BOOLEAN copy_ordering)
Definition: ring.cc:1318
#define NULL
Definition: omList.c:10
ideal idrCopyR_NoSort(ideal id, ring src_r, ring dest_r)
Definition: prCopy.cc:206
#define omAlloc0(size)
Definition: omAllocDecl.h:211
void sm_SpecialPolyDiv ( poly  ,
poly  ,
const ring   
)

Definition at line 1892 of file sparsmat.cc.

1893 {
1894  if (pNext(b) == NULL)
1895  {
1896  sm_PolyDivN(a, pGetCoeff(b),R);
1897  return;
1898  }
1899  sm_ExactPolyDiv(a, b, R);
1900 }
const poly a
Definition: syzextra.cc:212
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
Definition: monomials.h:51
static void sm_PolyDivN(poly, const number, const ring)
Definition: sparsmat.cc:2002
#define NULL
Definition: omList.c:10
#define R
Definition: sirandom.c:26
#define pNext(p)
Definition: monomials.h:43
static void sm_ExactPolyDiv(poly, poly, const ring)
Definition: sparsmat.cc:1904
const poly b
Definition: syzextra.cc:213