Changeset b9642b1 in git for kernel/ring.cc
- Timestamp:
- Jan 6, 2009, 3:00:57 PM (15 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 577c14692ef00b8a6d8470158473aeb6af6b08b3
- Parents:
- 939cb2de97b36ac54735806ce7150c37d0450106
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/ring.cc
r939cb2 rb9642b1 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ring.cc,v 1.10 5 2008-11-12 12:38:59Singular Exp $ */4 /* $Id: ring.cc,v 1.106 2009-01-06 13:59:35 Singular Exp $ */ 5 5 6 6 /* … … 1463 1463 int i,j; 1464 1464 ring res=(ring)omAllocBin(ip_sring_bin); 1465 res->idroot=NULL; /* local objects */ 1466 //int* order; /* array of orderings */ 1467 //int* block0; /* starting pos.*/ 1468 //int* block1; /* ending pos.*/ 1469 //char** parameter; /* names of parameters */ 1470 //number minpoly; 1471 //ideal minideal; 1472 //int** wvhdl; /* array of weight vectors */ 1473 //char ** names; /* array of variable names */ 1474 1475 res->options=r->options; /* ring dependent options */ 1476 1477 // what follows below here should be set by rComplete, _only_ 1478 //long *ordsgn; /* array of +/- 1 (or 0) for comparing monomials */ 1479 /* ExpL_Size entries*/ 1480 1481 // is NULL for lp or N == 1, otherwise non-NULL (with OrdSize > 0 entries) */ 1482 //sro_ord* typ; /* array of orderings + sizes, OrdSize entries */ 1483 1484 //ideal qideal; /* extension to the ring structure: qring */ 1485 1486 1487 //int* VarOffset; 1488 //int* firstwv; 1489 1490 //struct omBin_s* PolyBin; /* Bin from where monoms are allocated */ 1491 res->ch=r->ch; /* characteristic */ 1492 #ifdef HAVE_RINGS 1493 res->ringtype=r->ringtype; /* cring = 0 => coefficient field, cring = 1 => coeffs from Z/2^m */ 1494 //res->ringflaga=mpz_copy(r->ringflaga); 1495 res->ringflagb=r->ringflagb; 1496 #endif 1497 res->ref=0; /* reference counter to the ring */ 1498 1499 res->float_len=r->float_len; /* additional char-flags */ 1500 res->float_len2=r->float_len2; /* additional char-flags */ 1501 1502 res->N=r->N; /* number of vars */ 1503 1504 res->P=r->P; /* number of pars */ 1505 res->OrdSgn=r->OrdSgn; /* 1 for polynomial rings, -1 otherwise */ 1506 1507 res->firstBlockEnds=r->firstBlockEnds; 1508 #ifdef HAVE_PLURAL 1509 res->real_var_start=r->real_var_start; 1510 res->real_var_end=r->real_var_end; 1511 #endif 1512 1513 #ifdef HAVE_SHIFTBBA 1514 res->isLPring=r->isLPring; /* 0 for non-letterplace rings, otherwise the number of LP blocks, at least 1, known also as lV */ 1515 #endif 1516 1517 res->VectorOut=r->VectorOut; 1518 res->ShortOut=r->ShortOut; 1519 res->CanShortOut=r->CanShortOut; 1520 res->LexOrder=r->LexOrder; // TRUE if the monomial ordering has polynomial and power series blocks 1521 res->MixedOrder=r->MixedOrder; // ?? 1 for lex ordering (except ls), -1 otherwise 1522 res->ComponentOrder=r->ComponentOrder; 1523 1524 1525 // what follows below here should be set by rComplete, _only_ 1526 // contains component, but no weight fields in E */ 1527 //short ExpL_Size; // size of exponent vector in long 1528 //short CmpL_Size; // portions which need to be compared 1529 /* number of long vars in exp vector: 1530 long vars are those longs in the exponent vector which are 1531 occupied by variables, only */ 1532 //short VarL_Size; 1533 1534 //short BitsPerExp; /* number of bits per exponent */ 1535 //short ExpPerLong; /* maximal number of Exponents per long */ 1536 1537 //short pCompIndex; /* p->exp.e[pCompIndex] is the component */ 1538 //short pOrdIndex; /* p->exp[pOrdIndex] is pGetOrd(p) */ 1539 1540 //short OrdSize; /* size of ord vector (in sro_ord) */ 1541 1542 1543 /* if >= 0, long vars in exp vector are consecutive and start there 1544 if < 0, long vars in exp vector are not consecutive */ 1545 //short VarL_LowIndex; 1546 // number of exponents in r->VarL_Offset[0] 1547 // is minimal number of exponents in a long var 1548 //short MinExpPerLong; 1549 1550 /* if this is > 0, then NegWeightL_Offset[0..size_1] is index of longs in 1551 ExpVector whose values need an offset due to negative weights */ 1552 //short NegWeightL_Size; 1553 /* array of NegWeigtL_Size indicies */ 1554 //int* NegWeightL_Offset; 1555 1556 /* array of size VarL_Size, 1557 VarL_Offset[i] gets i-th long var in exp vector */ 1558 //int* VarL_Offset; 1559 1560 /* mask for getting single exponents */ 1561 //unsigned long bitmask; 1562 /* mask used for divisiblity tests */ 1563 //unsigned long divmask; 1564 1565 //p_Procs_s* p_Procs; 1566 1567 /* FDeg and LDeg */ 1568 //pFDegProc pFDeg; 1569 //pLDegProc pLDeg; 1570 1571 /* as it was determined by rComplete */ 1572 //pFDegProc pFDegOrig; 1573 /* and as it was determined before rOptimizeLDeg */ 1574 //pLDegProc pLDegOrig; 1575 1576 //p_SetmProc p_Setm; 1577 //n_Procs_s* cf; 1578 //ring algring; 1579 #ifdef HAVE_PLURAL 1580 // nc_struct* _nc; // private 1581 #endif 1465 1582 1466 1583 memcpy4(res,r,sizeof(ip_sring)); … … 1744 1861 } 1745 1862 1746 BOOLEAN rHasSimpleOrder( ring r)1863 BOOLEAN rHasSimpleOrder(const ring r) 1747 1864 { 1748 1865 if (r->order[0] == ringorder_unspec) return TRUE; … … 1763 1880 1764 1881 // returns TRUE, if simple lp or ls ordering 1765 BOOLEAN rHasSimpleLexOrder( ring r)1882 BOOLEAN rHasSimpleLexOrder(const ring r) 1766 1883 { 1767 1884 return rHasSimpleOrder(r) && … … 1772 1889 } 1773 1890 1774 BOOLEAN rOrder_is_DegOrdering( rRingOrder_t order)1891 BOOLEAN rOrder_is_DegOrdering(const rRingOrder_t order) 1775 1892 { 1776 1893 switch(order)
Note: See TracChangeset
for help on using the changeset viewer.