Changeset 1d1f93 in git
- Timestamp:
- Feb 9, 2015, 10:12:09 AM (9 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- d0e7cfba749eb576b61120883b3ef1f167e2d2a6
- Parents:
- 2f05b5d1e37c6c725c53ad68296b934d1e5983c888615dbd0782deeb4def60eef9657a8fa5c30e4d
- Files:
-
- 38 added
- 1 deleted
- 70 edited
Legend:
- Unmodified
- Added
- Removed
-
.gdbinit
r88615db r1d1f93 3 3 #break omReportError # use in case of problems with omaloc 4 4 #break dPolyReportError # use in case of problems with polynomial arithmetic 5 5 6 6 7 7 -
IntegerProgramming/binomial.cc
r2f05b5 r1d1f93 301 301 { 302 302 cerr<<"\nWARNING: binomial& binomial::operator=(const binomial&):\n" 303 "assig ment from corrupt binomial"<<endl;303 "assignment from corrupt binomial"<<endl; 304 304 exponent_vector=NULL; 305 305 return (*this); -
IntegerProgramming/binomial.h
r2f05b5 r1d1f93 115 115 116 116 117 // assig ment and access operators117 // assignment and access operators 118 118 119 119 binomial& operator=(const binomial&); -
IntegerProgramming/list.cc
r2f05b5 r1d1f93 963 963 964 964 965 ////////////////////////// assig ment ///////////////////////////////////////965 ////////////////////////// assignment /////////////////////////////////////// 966 966 967 967 -
Singular/LIB/algemodstd.lib
r88615db r1d1f93 296 296 { 297 297 /* 298 * compare the size of ideals in the list and 298 * compare the size of ideals in the list and 299 299 * check the corresponding leading monomials 300 300 * size(L)>=2 -
Singular/LIB/gradedModules.lib
r88615db r1d1f93 4 4 info=" 5 5 LIBRARY: gradedModules.lib Operations with graded modules/matrices/resolutions 6 AUTHOR : Oleksandr Motsak <U@D>, where U=motsak, D=mathematik.uni-kl.de7 Hanieh Keneshlou <hkeneshlou@yahoo.com>6 AUTHORS: Oleksandr Motsak <U@D>, where U=motsak, D=mathematik.uni-kl.de 7 @* Hanieh Keneshlou <hkeneshlou@yahoo.com> 8 8 KEYWORDS: graded modules, graded homomorphisms, syzygies 9 9 OVERVIEW: -
Singular/LIB/grobcov.lib
r2f05b5 r1d1f93 3084 3084 // where the w_l=(n_l1,..,n_ls) are intvec of length size(L), where 3085 3085 // n_lt fixes which element of (v_t1,..,v_tk_t) is to be 3086 // cho osen to form the tth (Q,P) for the lth element of the sheaf3086 // chosen to form the tth (Q,P) for the lth element of the sheaf 3087 3087 // representing the I-regular function. 3088 3088 // The selection is done to obtian the minimal number of elements -
Singular/LIB/normal.lib
r2f05b5 r1d1f93 186 186 if ( typeof(#[i]) == "string" ) 187 187 { 188 //--------------------------- cho osen methods -----------------------188 //--------------------------- chosen methods ----------------------- 189 189 if ( (#[i]=="isprim") or (#[i]=="isPrim") ) 190 190 {decomp = 0;} … … 5725 5725 } 5726 5726 5727 //--------------------------- cho osen methods -----------------------5727 //--------------------------- chosen methods ----------------------- 5728 5728 // "withGens": computes algebra generators for each irreducible component 5729 5729 // ### the extra code for withGens should be incorporated in the general case -
Singular/LIB/primdec.lib
r88615db r1d1f93 665 665 if(deg(act[1][1])>0) 666 666 { 667 l[s+2]=ideal(0); 667 668 l[s+1]=std(l[2*i-1],act[2]); 668 669 if(homog(l[s+1])==1) … … 670 671 l[s+2]=maxideal(1); 671 672 } 672 else 673 { 674 l[s+2]=ideal(0); 675 } 673 //else { l[s+2]=ideal(0); } 676 674 keepprime[s div 2+1]=interred(keepprime[i]+ideal(@f)); 677 675 if(homog(keepprime[s div 2+1])==1) … … 2811 2809 int n=nvars(R); 2812 2810 2813 defop = option(get);2811 intvec op = option(get); 2814 2812 2815 2813 //---Anfang Provisorium -
Singular/LIB/surf.lib
r2f05b5 r1d1f93 177 177 surf_call = "singularsurf "; 178 178 surf_call = surf_call + l + " >/dev/null 2>&1"; 179 "Close window to exit from `singular urf`.";179 "Close window to exit from `singularsurf`."; 180 180 181 181 i = system("sh", surf_call); -
Singular/LIB/tst.lib
r88615db r1d1f93 235 235 if (!defined(prefix)) 236 236 { 237 defprefix = tst_status_counter;237 int prefix = tst_status_counter; 238 238 } 239 239 tst_status_out(prefix, "tst_memory_0", memory(0)); -
Singular/dyn_modules/gfanlib/Makefile.am
r88615db r1d1f93 1 1 ACLOCAL_AMFLAGS = -I ../../m4 2 2 3 SOURCES = bbcone.cc bbcone.h bbfan.cc bbfan.h bbpolytope.cc bbpolytope.h gfan.h gitfan.cc gitfan.h gfanlib.cc3 SOURCES = singularWishlist.h gfanlib_exceptions.h callgfanlib_conversion.cc callgfanlib_conversion.h bbcone.cc bbcone.h bbfan.cc bbfan.h bbpolytope.cc bbpolytope.h gfan.h gitfan.cc gitfan.h std_wrapper.cc std_wrapper.h tropicalVarietyOfPolynomials.h tropicalVarietyOfPolynomials.cc ppinitialReduction.cc ppinitialReduction.h containsMonomial.cc containsMonomial.h adjustWeights.cc adjustWeights.h tropicalStrategy.cc tropicalStrategy.h initial.cc initial.h witness.cc witness.h lift.cc lift.h flip.cc flip.h tropicalCurves.cc tropicalCurves.h groebnerCone.cc groebnerCone.h startingCone.cc startingCone.h tropicalTraversal.cc tropicalTraversal.h tropicalVarietyOfIdeals.cc tropicalVarietyOfIdeals.h tropicalVariety.cc tropicalVariety.h tropical.cc tropical.h gfanlib.cc 4 4 5 MY_CPPFLAGS = -I${top_srcdir} -I${top_builddir} \5 MY_CPPFLAGS = -I${srcdir} -I${top_srcdir} -I${top_builddir} \ 6 6 -I${top_srcdir}/libpolys -I${top_builddir}/libpolys \ 7 7 ${FACTORY_INCLUDES} ${RESOURCES_INCLUDES} ${OMALLOC_INCLUDES} \ … … 9 9 10 10 if SI_BUILTIN_GFANLIB 11 if HAVE_GFANLIB 11 12 noinst_LTLIBRARIES=gfanlib.la 13 endif 12 14 ## moduledir = $(libdir)/singular 13 15 P_PROCS_CPPFLAGS_COMMON = -DSTATIC_VERSION 14 16 P_PROCS_MODULE_LDFLAGS = -module 15 17 else 18 if HAVE_GFANLIB 16 19 module_LTLIBRARIES=gfanlib.la 20 endif 17 21 moduledir = $(libexecdir)/singular/MOD 18 22 P_PROCS_CPPFLAGS_COMMON = -DDYNAMIC_VERSION … … 25 29 gfanlib_la_CPPFLAGS = ${MY_CPPFLAGS} ${P_PROCS_CPPFLAGS_COMMON} ${CDDGMPCPPFLAGS} 26 30 gfanlib_la_LDFLAGS = ${P_PROCS_MODULE_LDFLAGS} 31 32 # forcefully enable exceptions for polymake 33 CXXFLAGS+= $(FEXCEPTIONSFRTTI_CXXFLAGS) 27 34 28 35 if HAVE_GFANLIB -
Singular/dyn_modules/gfanlib/bbcone.cc
r88615db r1d1f93 9 9 #include <coeffs/longrat.h> 10 10 11 #include <Singular/ipid.h>12 11 #include <Singular/ipid.h> 13 12 #include <Singular/ipshell.h> 14 13 #include <Singular/blackbox.h> 15 14 16 // #include <omalloc/omalloc.h> 17 // #include <kernel/intvec.h> 18 // #include <kernel/longrat.h> 19 // #include <Singular/lists.h> 20 // #include <Singular/subexpr.h> 15 #include <callgfanlib_conversion.h> 16 #include <sstream> 21 17 22 18 #include <gfanlib/gfanlib.h> 23 19 #include <gfanlib/gfanlib_q.h> 24 20 25 #include "bbfan.h" 26 #include "bbpolytope.h" 27 28 29 #include <sstream> 21 #include <bbfan.h> 22 #include <bbpolytope.h> 30 23 31 24 int coneID; 32 33 number integerToNumber(const gfan::Integer &I)34 {35 mpz_t i;36 mpz_init(i);37 I.setGmp(i);38 long m = 268435456;39 if(mpz_cmp_si(i,m))40 {41 int temp = (int) mpz_get_si(i);42 return n_Init(temp,coeffs_BIGINT);43 }44 else45 return n_InitMPZ(i,coeffs_BIGINT);46 }47 48 bigintmat* zVectorToBigintmat(const gfan::ZVector &zv)49 {50 int d=zv.size();51 bigintmat* bim = new bigintmat(1,d,coeffs_BIGINT);52 for(int i=1;i<=d;i++)53 {54 number temp = integerToNumber(zv[i-1]);55 bim->set(1,i,temp);56 n_Delete(&temp,coeffs_BIGINT);57 }58 return bim;59 }60 61 bigintmat* zMatrixToBigintmat(const gfan::ZMatrix &zm)62 {63 int d=zm.getHeight();64 int n=zm.getWidth();65 bigintmat* bim = new bigintmat(d,n,coeffs_BIGINT);66 for(int i=1;i<=d;i++)67 for(int j=1; j<=n; j++)68 {69 number temp = integerToNumber(zm[i-1][j-1]);70 bim->set(i,j,temp);71 n_Delete(&temp,coeffs_BIGINT);72 }73 return bim;74 }75 76 gfan::Integer* numberToInteger(const number &n)77 {78 if (SR_HDL(n) & SR_INT)79 return new gfan::Integer(SR_TO_INT(n));80 else81 return new gfan::Integer(n->z);82 }83 84 gfan::ZMatrix* bigintmatToZMatrix(const bigintmat &bim)85 {86 int d=bim.rows();87 int n=bim.cols();88 gfan::ZMatrix* zm = new gfan::ZMatrix(d,n);89 for(int i=0;i<d;i++)90 for(int j=0;j<n;j++)91 {92 number temp = BIMATELEM(bim, i+1, j+1);93 gfan::Integer* gi = numberToInteger(temp);94 (*zm)[i][j] = *gi;95 delete gi;96 }97 return zm;98 }99 100 gfan::ZVector* bigintmatToZVector(const bigintmat &bim)101 {102 gfan::ZVector* zv=new gfan::ZVector(bim.cols());103 for(int j=0; j<bim.cols(); j++)104 {105 number temp = BIMATELEM(bim, 1, j+1);106 gfan::Integer* gi = numberToInteger(temp);107 (*zv)[j] = *gi;108 n_Delete(&temp,coeffs_BIGINT);109 delete gi;110 }111 return zv;112 }113 114 char* toString(gfan::ZMatrix const &zm)115 {116 bigintmat* bim = zMatrixToBigintmat(zm);117 char* s = bim->StringAsPrinted();118 if (s==NULL)119 s = (char*) omAlloc0(sizeof(char));120 delete bim;121 return s;122 }123 25 124 26 std::string toString(const gfan::ZCone* const c) … … 199 101 delete zd; 200 102 } 201 gfan::ZCone* zc = (gfan::ZCone*)r->Data(); 202 newZc = new gfan::ZCone(*zc); 103 newZc = (gfan::ZCone*)r->CopyD(); 203 104 } 204 105 else if (r->Typ()==INT_CMD) … … 1055 956 gfan::ZVector randomPoint(const gfan::ZCone* zc) 1056 957 { 958 gfan::ZVector rp = gfan::ZVector(zc->ambientDimension()); 959 1057 960 gfan::ZMatrix rays = zc->extremeRays(); 1058 gfan::ZVector rp = gfan::ZVector(zc->ambientDimension());1059 961 for (int i=0; i<rays.getHeight(); i++) 1060 962 { … … 1062 964 rp = rp + n * rays[i]; 1063 965 } 966 967 gfan::ZMatrix lins = zc->generatorsOfLinealitySpace(); 968 for (int i=0; i<lins.getHeight(); i++) 969 { 970 int n = siRand(); 971 rp = rp + n * lins[i]; 972 } 973 1064 974 return rp; 1065 975 } … … 1593 1503 } 1594 1504 1595 gfan::ZVector intStar2ZVector(const int d, const int* i)1596 {1597 gfan::ZVector zv(d);1598 for(int j=0; j<d; j++)1599 zv[j]=i[j+1];1600 return zv;1601 }1602 1603 BOOLEAN maximalGroebnerCone(leftv res, leftv args)1604 {1605 leftv u = args;1606 if ((u != NULL) && (u->Typ() == IDEAL_CMD))1607 {1608 leftv v = u->next;1609 if (v == NULL)1610 {1611 int n = currRing->N;1612 ideal I = (ideal) u->Data();1613 poly g = NULL;1614 int* leadexpv = (int*) omAlloc((n+1)*sizeof(int));1615 int* tailexpv = (int*) omAlloc((n+1)*sizeof(int));1616 gfan::ZVector leadexpw = gfan::ZVector(n);1617 gfan::ZVector tailexpw = gfan::ZVector(n);1618 gfan::ZMatrix inequalities = gfan::ZMatrix(0,n);1619 for (int i=0; i<IDELEMS(I); i++)1620 {1621 g = (poly) I->m[i]; pGetExpV(g,leadexpv);1622 leadexpw = intStar2ZVector(n, leadexpv);1623 pIter(g);1624 while (g != NULL)1625 {1626 pGetExpV(g,tailexpv);1627 tailexpw = intStar2ZVector(n, tailexpv);1628 inequalities.appendRow(leadexpw-tailexpw);1629 pIter(g);1630 }1631 }1632 gfan::ZCone* gCone = new gfan::ZCone(inequalities,gfan::ZMatrix(0, inequalities.getWidth()));1633 omFreeSize(leadexpv,(n+1)*sizeof(int));1634 omFreeSize(tailexpv,(n+1)*sizeof(int));1635 1636 res->rtyp = coneID;1637 res->data = (void*) gCone;1638 return FALSE;1639 }1640 }1641 WerrorS("maximalGroebnerCone: unexpected parameters");1642 return TRUE;1643 }1644 1645 1505 1646 1506 lists listOfFacets(const gfan::ZCone &zc) … … 1696 1556 1697 1557 1698 poly initial(poly p)1699 {1700 poly g = p;1701 poly h = p_Head(g,currRing);1702 poly f = h;1703 long d = p_Deg(g,currRing);1704 pIter(g);1705 while ((g != NULL) && (p_Deg(g,currRing) == d))1706 {1707 pNext(h) = p_Head(g,currRing);1708 pIter(h);1709 pIter(g);1710 }1711 return(f);1712 }1713 1714 1715 BOOLEAN initial(leftv res, leftv args)1716 {1717 leftv u = args;1718 if ((u != NULL) && (u->Typ() == POLY_CMD))1719 {1720 leftv v = u->next;1721 if (v == NULL)1722 {1723 poly p = (poly) u->Data();1724 res->rtyp = POLY_CMD;1725 res->data = (void*) initial(p);1726 return FALSE;1727 }1728 }1729 if ((u != NULL) && (u->Typ() == IDEAL_CMD))1730 {1731 leftv v = u->next;1732 if (v == NULL)1733 {1734 ideal I = (ideal) u->Data();1735 ideal inI = idInit(IDELEMS(I));1736 poly g;1737 for (int i=0; i<IDELEMS(I); i++)1738 {1739 g = (poly) I->m[i];1740 inI->m[i]=initial(g);1741 }1742 res->rtyp = IDEAL_CMD;1743 res->data = (void*) inI;1744 return FALSE;1745 }1746 }1747 WerrorS("initial: unexpected parameters");1748 return TRUE;1749 }1750 1751 1752 BOOLEAN homogeneitySpace(leftv res, leftv args)1753 {1754 leftv u = args;1755 if ((u != NULL) && (u->Typ() == IDEAL_CMD))1756 {1757 leftv v = u->next;1758 if (v == NULL)1759 {1760 int n = currRing->N;1761 ideal I = (ideal) u->Data();1762 poly g;1763 int* leadexpv = (int*) omAlloc((n+1)*sizeof(int));1764 int* tailexpv = (int*) omAlloc((n+1)*sizeof(int));1765 gfan::ZVector leadexpw = gfan::ZVector(n);1766 gfan::ZVector tailexpw = gfan::ZVector(n);1767 gfan::ZMatrix equations = gfan::ZMatrix(0,n);1768 for (int i=0; i<IDELEMS(I); i++)1769 {1770 g = (poly) I->m[i]; pGetExpV(g,leadexpv);1771 leadexpw = intStar2ZVector(n, leadexpv);1772 pIter(g);1773 while (g != NULL)1774 {1775 pGetExpV(g,tailexpv);1776 tailexpw = intStar2ZVector(n, tailexpv);1777 equations.appendRow(leadexpw-tailexpw);1778 pIter(g);1779 }1780 }1781 gfan::ZCone* gCone = new gfan::ZCone(gfan::ZMatrix(0, equations.getWidth()),equations);1782 omFreeSize(leadexpv,(n+1)*sizeof(int));1783 omFreeSize(tailexpv,(n+1)*sizeof(int));1784 1785 res->rtyp = coneID;1786 res->data = (void*) gCone;1787 return FALSE;1788 }1789 }1790 WerrorS("homogeneitySpace: unexpected parameters");1791 return TRUE;1792 }1793 1794 1795 BOOLEAN groebnerCone(leftv res, leftv args)1796 {1797 leftv u = args;1798 if ((u != NULL) && (u->Typ() == IDEAL_CMD))1799 {1800 leftv v = u->next;1801 if (v == NULL)1802 {1803 int n = currRing->N;1804 ideal I = (ideal) u->Data();1805 poly g = NULL;1806 int* leadexpv = (int*) omAlloc((n+1)*sizeof(int));1807 int* tailexpv = (int*) omAlloc((n+1)*sizeof(int));1808 gfan::ZVector leadexpw = gfan::ZVector(n);1809 gfan::ZVector tailexpw = gfan::ZVector(n);1810 gfan::ZMatrix inequalities = gfan::ZMatrix(0,n);1811 gfan::ZMatrix equations = gfan::ZMatrix(0,n);1812 long d;1813 for (int i=0; i<IDELEMS(I); i++)1814 {1815 g = (poly) I->m[i]; pGetExpV(g,leadexpv);1816 leadexpw = intStar2ZVector(n, leadexpv);1817 pIter(g);1818 d = p_Deg(g,currRing);1819 while ((g != NULL) && (p_Deg(g,currRing) == d))1820 {1821 pGetExpV(g,tailexpv);1822 tailexpw = intStar2ZVector(n, tailexpv);1823 equations.appendRow(leadexpw-tailexpw);1824 pIter(g);1825 }1826 1827 if (g != NULL)1828 {1829 while (g != NULL)1830 {1831 pGetExpV(g,tailexpv);1832 tailexpw = intStar2ZVector(n, tailexpv);1833 inequalities.appendRow(leadexpw-tailexpw);1834 pIter(g);1835 }1836 }1837 }1838 gfan::ZCone* gCone = new gfan::ZCone(inequalities,equations);1839 omFreeSize(leadexpv,(n+1)*sizeof(int));1840 omFreeSize(tailexpv,(n+1)*sizeof(int));1841 1842 res->rtyp = coneID;1843 res->data = (void*) gCone;1844 return FALSE;1845 }1846 }1847 WerrorS("groebnerCone: unexpected parameters");1848 return TRUE;1849 }1850 1851 1558 /*** 1852 1559 * Given a cone and a point in its boundary, 1853 1560 * returns the inner normal vector of a facet 1854 1561 * containing the point. 1562 * Unless the point is in the relative interior of the facet 1563 * the facet is not unique. 1855 1564 * In case no facet contains the point, 1856 1565 * then 0 is returned. … … 1903 1612 WerrorS("facetContaining: unexpected parameters"); 1904 1613 return TRUE; 1614 } 1615 1616 1617 /*** 1618 * Computes a relative interior point for each facet of zc 1619 **/ 1620 gfan::ZMatrix interiorPointsOfFacets(const gfan::ZCone &zc, const std::set<gfan::ZVector> &exceptThese) 1621 { 1622 gfan::ZMatrix inequalities = zc.getFacets(); 1623 gfan::ZMatrix equations = zc.getImpliedEquations(); 1624 int r = inequalities.getHeight(); 1625 int c = inequalities.getWidth(); 1626 1627 /* our cone has r facets, if r==0 return empty matrices */ 1628 gfan::ZMatrix relativeInteriorPoints = gfan::ZMatrix(0,c); 1629 if (r==0) return relativeInteriorPoints; 1630 1631 /* next we iterate over each of the r facets, 1632 * build the respective cone and add it to the list 1633 * this is the i=0 case */ 1634 gfan::ZMatrix newInequalities = inequalities.submatrix(1,0,r,c); 1635 gfan::ZMatrix newEquations = equations; 1636 newEquations.appendRow(inequalities[0]); 1637 gfan::ZCone facet = gfan::ZCone(newInequalities,newEquations); 1638 facet.canonicalize(); 1639 gfan::ZVector interiorPoint = facet.getRelativeInteriorPoint(); 1640 if (exceptThese.count(interiorPoint)==0) 1641 relativeInteriorPoints.appendRow(interiorPoint); 1642 1643 /* these are the cases i=1,...,r-2 */ 1644 for (int i=1; i<r-1; i++) 1645 { 1646 newInequalities = inequalities.submatrix(0,0,i,c); 1647 newInequalities.append(inequalities.submatrix(i+1,0,r,c)); 1648 newEquations = equations; 1649 newEquations.appendRow(inequalities[i]); 1650 facet = gfan::ZCone(newInequalities,newEquations); 1651 facet.canonicalize(); 1652 interiorPoint = facet.getRelativeInteriorPoint(); 1653 if (exceptThese.count(interiorPoint)==0) 1654 relativeInteriorPoints.appendRow(interiorPoint); 1655 } 1656 1657 /* this is the i=r-1 case */ 1658 newInequalities = inequalities.submatrix(0,0,r-1,c); 1659 newEquations = equations; 1660 newEquations.appendRow(inequalities[r-1]); 1661 facet = gfan::ZCone(newInequalities,newEquations); 1662 facet.canonicalize(); 1663 interiorPoint = facet.getRelativeInteriorPoint(); 1664 if (exceptThese.count(interiorPoint)==0) 1665 relativeInteriorPoints.appendRow(interiorPoint); 1666 1667 return relativeInteriorPoints; 1905 1668 } 1906 1669 … … 1959 1722 p->iiAddCproc("","listContainsCone",FALSE,containsCone); 1960 1723 p->iiAddCproc("","listOfFacets",FALSE,listOfFacets); 1961 p->iiAddCproc("","maximalGroebnerCone",FALSE,maximalGroebnerCone);1962 p->iiAddCproc("","groebnerCone",FALSE,groebnerCone);1963 p->iiAddCproc("","initial",FALSE,initial);1964 p->iiAddCproc("","homogeneitySpace",FALSE,homogeneitySpace);1965 1724 p->iiAddCproc("","facetContaining",FALSE,facetContaining); 1966 1725 coneID=setBlackboxStuff(b,"cone"); -
Singular/dyn_modules/gfanlib/bbcone.h
r88615db r1d1f93 16 16 void bbcone_setup(SModulFunctions* p); 17 17 18 /***19 * Conversion functions for data types20 **/21 gfan::Integer* numberToInteger(const number &n);22 number integerToNumber(const gfan::Integer &I);23 bigintmat* zVectorToBigintmat(const gfan::ZVector &zv);24 bigintmat* zMatrixToBigintmat(const gfan::ZMatrix &zm);25 gfan::ZMatrix* bigintmatToZMatrix(const bigintmat &bim);26 gfan::ZVector* bigintmatToZVector(const bigintmat &bim);27 28 gfan::ZVector intStar2ZVector(const int d, const int* i);29 char* toString(gfan::ZMatrix const &m);30 18 std::string toString(const gfan::ZCone* const c); 31 19 32 /***33 * Other functions34 **/35 int getDimension(gfan::ZCone* zc);36 int getCodimension(gfan::ZCone* zc);37 int getLinealityDimension(gfan::ZCone* zc);38 20 gfan::ZVector randomPoint(const gfan::ZCone* zc); 39 21 gfan::ZCone liftUp(const gfan::ZCone &zc); 22 gfan::ZMatrix interiorPointsOfFacets(const gfan::ZCone &zc, const std::set<gfan::ZVector> &exceptThese=std::set<gfan::ZVector>()); 40 23 41 24 #endif -
Singular/dyn_modules/gfanlib/bbfan.cc
r88615db r1d1f93 11 11 #include <Singular/blackbox.h> 12 12 13 #include "bbfan.h"14 #include "bbcone.h"15 #include "gfan.h"13 #include <callgfanlib_conversion.h> 14 #include <bbfan.h> 15 #include <gfan.h> 16 16 #include <sstream> 17 18 // #include <kernel/bigintmat.h>19 // #include <omalloc/omalloc.h>20 // #include <kernel/longrat.h>21 // #include <Singular/subexpr.h>22 // #include <Singular/lists.h>23 // #include <gfanlib/gfanlib.h>24 // #include <gfanlib/gfanlib_zfan.h>25 17 26 18 int fanID; … … 46 38 { 47 39 gfan::ZFan* zf = (gfan::ZFan*)d; 48 std::string s = zf->toString JustRaysAndMaximalCones();40 std::string s = zf->toString(2+4+8+128); 49 41 return omStrDup(s.c_str()); 42 // ======= 43 // std::stringstream s; 44 // std::string raysAndCones = zf->toStringJustRaysAndMaximalCones(); 45 // s << raysAndCones; 46 // if (zf->getDimension() >= 0) // <=> zf is not empty 47 // { 48 // assert(zf->numberOfConesOfDimension(zf->getDimension()-zf->getLinealityDimension(),0,0)); 49 // gfan::ZCone zc = zf->getCone(zf->getDimension()-zf->getLinealityDimension(),0,0,0); 50 // gfan::ZMatrix genLinSpace = zc.generatorsOfLinealitySpace(); 51 // char* gens = toString(genLinSpace); 52 // s << std::endl << "GENERATORS_LINEALITY_SPACE:" << std::endl; 53 // s << gens; 54 // } 55 // std::string sstring = s.str(); 56 // return omStrDup(sstring.c_str()); 57 // >>>>>>> status updated 11.03. 50 58 } 51 59 } … … 77 85 delete zd; 78 86 } 79 gfan::ZFan* zf = (gfan::ZFan*) r->Data(); 80 newZf = new gfan::ZFan(*zf); 87 newZf = (gfan::ZFan*) r->CopyD(); 81 88 } 82 89 else if (r->Typ()==INT_CMD) … … 301 308 leftv u=args; 302 309 if ((u != NULL) && (u->Typ() == fanID)) 303 { 304 gfan::ZFan* zf = (gfan::ZFan*)u->Data(); 305 int d = zf->getAmbientDimension(); 306 int n = 0; 307 308 for (int i=0; i<=d; i++) 309 n = n + zf->numberOfConesOfDimension(i,0,0); 310 311 res->rtyp = INT_CMD; 312 res->data = (void*) (long) n; 313 return FALSE; 314 } 315 else 316 { 317 WerrorS("check_compatibility: unexpected parameters"); 318 return TRUE; 319 } 310 { 311 gfan::ZFan* zf = (gfan::ZFan*)u->Data(); 312 int d = zf->getAmbientDimension(); 313 int n = 0; 314 315 for (int i=0; i<=d; i++) 316 n = n + zf->numberOfConesOfDimension(i,0,0); 317 318 res->rtyp = INT_CMD; 319 res->data = (void*) (long) n; 320 return FALSE; 321 } 322 WerrorS("ncones: unexpected parameters"); 323 return TRUE; 320 324 } 321 325 … … 324 328 leftv u=args; 325 329 if ((u != NULL) && (u->Typ() == fanID)) 326 { 327 gfan::ZFan* zf = (gfan::ZFan*)u->Data(); 328 329 int n = 0; 330 for (int d=0; d<=zf->getAmbientDimension(); d++) 331 { n = n + zf->numberOfConesOfDimension(d,0,1); } 332 333 res->rtyp = INT_CMD; 334 res->data = (void*) (long) n; 335 return FALSE; 336 } 337 else 338 { 339 WerrorS("nmaxcones: unexpected parameters"); 340 return TRUE; 341 } 342 } 343 344 bool isCompatible(gfan::ZFan* zf, gfan::ZCone* zc) 330 { 331 gfan::ZFan* zf = (gfan::ZFan*)u->Data(); 332 333 int n = 0; 334 for (int d=0; d<=zf->getAmbientDimension(); d++) 335 n = n + zf->numberOfConesOfDimension(d,0,1); 336 337 res->rtyp = INT_CMD; 338 res->data = (void*) (long) n; 339 return FALSE; 340 } 341 WerrorS("nmaxcones: unexpected parameters"); 342 return TRUE; 343 } 344 345 bool isCompatible(const gfan::ZFan* zf, const gfan::ZCone* zc) 345 346 { 346 347 bool b = (zf->getAmbientDimension() == zc->ambientDimension()); … … 458 459 } 459 460 } 460 // if ((u != NULL) && (u->Typ() == coneID))461 // {462 // leftv v=u->next;463 // if ((v != NULL) && (v->Typ() == coneID))464 // {465 // gfan::ZCone* zc = (gfan::ZCone*)u->Data();466 // gfan::ZCone* zd = (gfan::ZCone*)v->Data();467 // res->rtyp = INT_CMD;468 // res->data = (void*) (int) hasFace(zc,zd);469 // return FALSE;470 // }471 // }472 461 WerrorS("containsInCollection: unexpected parameters"); 473 462 return TRUE; 474 463 } 475 464 476 // BOOLEAN coneContaining(leftv res, leftv args) 477 // { 478 // leftv u=args; 479 // if ((u != NULL) && (u->Typ() == fanID)) 480 // { 481 // if ((v != NULL) && (v->Typ() == BIGINTMAT_CMD)) 482 // { 483 // gfan::ZFan* zf = (gfan::ZFan*)u->Data(); 484 // bigintmat* vec = (bigintmat*)v->Data(); 485 // } 486 // } 487 // WerrorS("coneContaining: unexpected parameters"); 488 // return TRUE; 489 // } 465 BOOLEAN coneContaining(leftv res, leftv args) 466 { 467 leftv u=args; 468 if ((u != NULL) && (u->Typ() == fanID)) 469 { 470 leftv v=u->next; 471 if ((v != NULL) && ((v->Typ() == BIGINTMAT_CMD) || (v->Typ() == INTVEC_CMD))) 472 { 473 gfan::ZFan* zf = (gfan::ZFan*)u->Data(); 474 gfan::ZVector* point; 475 if (v->Typ() == INTVEC_CMD) 476 { 477 intvec* w0 = (intvec*) v->Data(); 478 bigintmat* w1 = iv2bim(w0,coeffs_BIGINT); 479 w1->inpTranspose(); 480 point = bigintmatToZVector(*w1); 481 delete w1; 482 } 483 else 484 { 485 bigintmat* w1 = (bigintmat*) v->Data(); 486 point = bigintmatToZVector(*w1); 487 } 488 lists L = (lists)omAllocBin(slists_bin); 489 res->rtyp = LIST_CMD; 490 res->data = (void*) L; 491 delete point; 492 return FALSE; 493 } 494 } 495 WerrorS("coneContaining: unexpected parameters"); 496 return TRUE; 497 } 490 498 491 499 BOOLEAN removeCone(leftv res, leftv args) … … 559 567 if (0<=d && d<=zf->getAmbientDimension()) 560 568 { 561 if (0<i && i<=zf->numberOfConesOfDimension(d,oo,mm)) 569 int ld = zf->getLinealityDimension(); 570 if (0<i && i<=zf->numberOfConesOfDimension(d-ld,oo,mm)) 562 571 { 563 572 i=i-1; 564 int ld = zf->getLinealityDimension();565 573 if (d-ld>=0) 566 574 { … … 689 697 } 690 698 691 BOOLEAN isComplete(leftv res, leftv args)692 {693 leftv u=args;694 if ((u != NULL) && (u->Typ() == fanID))695 {696 gfan::ZFan* zf = (gfan::ZFan*) u->Data();697 int b = zf->isComplete();698 res->rtyp = INT_CMD;699 res->data = (void*) (long) b;700 return FALSE;701 }702 WerrorS("isComplete: unexpected parameters");703 return TRUE;704 }699 // BOOLEAN isComplete(leftv res, leftv args) 700 // { 701 // leftv u=args; 702 // if ((u != NULL) && (u->Typ() == fanID)) 703 // { 704 // gfan::ZFan* zf = (gfan::ZFan*) u->Data(); 705 // int b = zf->isComplete(); 706 // res->rtyp = INT_CMD; 707 // res->data = (void*) (long) b; 708 // return FALSE; 709 // } 710 // WerrorS("isComplete: unexpected parameters"); 711 // return TRUE; 712 // } 705 713 706 714 BOOLEAN fVector(leftv res, leftv args) … … 866 874 867 875 868 BOOLEAN tropicalVariety(leftv res, leftv args)869 {870 leftv u=args;871 if ((u != NULL) && (u->Typ() == POLY_CMD))872 {873 int n = rVar(currRing);874 gfan::ZFan* zf = new gfan::ZFan(n);875 int* expv1 = (int*)omAlloc((n+1)*sizeof(int));876 int* expv2 = (int*)omAlloc((n+1)*sizeof(int));877 int* expvr = (int*)omAlloc((n+1)*sizeof(int));878 gfan::ZVector expw1 = gfan::ZVector(n);879 gfan::ZVector expw2 = gfan::ZVector(n);880 gfan::ZVector expwr = gfan::ZVector(n);881 gfan::ZMatrix eq, ineq;882 for (poly s1=(poly)u->Data(); s1!=NULL; pIter(s1))883 {884 pGetExpV(s1,expv1);885 expw1 = intStar2ZVector(n,expv1);886 for (poly s2=pNext(s1); s2!=NULL; pIter(s2))887 {888 pGetExpV(s2,expv2);889 expw2 = intStar2ZVector(n,expv2);890 eq = gfan::ZMatrix(0,n);891 eq.appendRow(expw1-expw2);892 ineq = gfan::ZMatrix(0,n);893 for (poly r=(poly)u->Data(); r!=NULL; pIter(r))894 {895 pGetExpV(r,expvr);896 expwr = intStar2ZVector(n,expvr);897 if ((r!=s1) && (r!=s2))898 {899 ineq.appendRow(expw1-expwr);900 }901 }902 gfan::ZCone zc = gfan::ZCone(ineq,eq);903 zf->insert(zc);904 }905 }906 omFreeSize(expv1,(n+1)*sizeof(int));907 omFreeSize(expv2,(n+1)*sizeof(int));908 omFreeSize(expvr,(n+1)*sizeof(int));909 res->rtyp = fanID;910 res->data = (void*) zf;911 return FALSE;912 }913 WerrorS("tropicalVariety: unexpected parameters");914 return TRUE;915 }916 917 gfan::ZFan * commonRefinement(gfan::ZFan* zf, gfan::ZFan*zg)918 { 919 assume(zf ->getAmbientDimension() == zg->getAmbientDimension());876 // BOOLEAN tropicalVariety(leftv res, leftv args) 877 // { 878 // leftv u=args; 879 // if ((u != NULL) && (u->Typ() == POLY_CMD)) 880 // { 881 // int n = rVar(currRing); 882 // gfan::ZFan* zf = new gfan::ZFan(n); 883 // int* expv1 = (int*)omAlloc((n+1)*sizeof(int)); 884 // int* expv2 = (int*)omAlloc((n+1)*sizeof(int)); 885 // int* expvr = (int*)omAlloc((n+1)*sizeof(int)); 886 // gfan::ZVector expw1 = gfan::ZVector(n); 887 // gfan::ZVector expw2 = gfan::ZVector(n); 888 // gfan::ZVector expwr = gfan::ZVector(n); 889 // gfan::ZMatrix eq, ineq; 890 // for (poly s1=(poly)u->Data(); s1!=NULL; pIter(s1)) 891 // { 892 // pGetExpV(s1,expv1); 893 // expw1 = intStar2ZVector(n,expv1); 894 // for (poly s2=pNext(s1); s2!=NULL; pIter(s2)) 895 // { 896 // pGetExpV(s2,expv2); 897 // expw2 = intStar2ZVector(n,expv2); 898 // eq = gfan::ZMatrix(0,n); 899 // eq.appendRow(expw1-expw2); 900 // ineq = gfan::ZMatrix(0,n); 901 // for (poly r=(poly)u->Data(); r!=NULL; pIter(r)) 902 // { 903 // pGetExpV(r,expvr); 904 // expwr = intStar2ZVector(n,expvr); 905 // if ((r!=s1) && (r!=s2)) 906 // { 907 // ineq.appendRow(expw1-expwr); 908 // } 909 // } 910 // gfan::ZCone zc = gfan::ZCone(ineq,eq); 911 // zf->insert(zc); 912 // } 913 // } 914 // omFreeSize(expv1,(n+1)*sizeof(int)); 915 // omFreeSize(expv2,(n+1)*sizeof(int)); 916 // omFreeSize(expvr,(n+1)*sizeof(int)); 917 // res->rtyp = fanID; 918 // res->data = (void*) zf; 919 // return FALSE; 920 // } 921 // WerrorS("tropicalVariety: unexpected parameters"); 922 // return TRUE; 923 // } 924 925 gfan::ZFan commonRefinement(gfan::ZFan zf, gfan::ZFan zg) 926 { 927 assume(zf.getAmbientDimension() == zg.getAmbientDimension()); 920 928 921 929 // gather all maximal cones of f and g 922 930 std::list<gfan::ZCone> maximalConesOfF; 923 for (int d=0; d<=zf->getAmbientDimension(); d++) 924 { 925 for (int i=0; i<zf->numberOfConesOfDimension(d,0,1); i++) 926 { 927 maximalConesOfF.push_back(zf->getCone(d,i,0,1)); 928 } 929 } 931 for (int d=0; d<=zf.getAmbientDimension(); d++) 932 for (int i=0; i<zf.numberOfConesOfDimension(d,0,1); i++) 933 maximalConesOfF.push_back(zf.getCone(d,i,0,1)); 930 934 931 935 std::list<gfan::ZCone> maximalConesOfG; 932 for (int d=0; d<=zg->getAmbientDimension(); d++) 933 { 934 for (int i=0; i<zg->numberOfConesOfDimension(d,0,1); i++) 935 { 936 maximalConesOfG.push_back(zg->getCone(d,i,0,1)); 937 } 938 } 936 for (int d=0; d<=zg.getAmbientDimension(); d++) 937 for (int i=0; i<zg.numberOfConesOfDimension(d,0,1); i++) 938 maximalConesOfG.push_back(zg.getCone(d,i,0,1)); 939 939 940 940 // construct a new fan out of their intersections 941 gfan::ZFan * zr = new gfan::ZFan(zf->getAmbientDimension());941 gfan::ZFan zr = gfan::ZFan(zf.getAmbientDimension()); 942 942 for (std::list<gfan::ZCone>::iterator itf=maximalConesOfF.begin(); 943 943 itf != maximalConesOfF.end(); itf++) 944 {945 944 for (std::list<gfan::ZCone>::iterator itg=maximalConesOfG.begin(); 946 945 itg != maximalConesOfG.end(); itg++) 947 { 948 zr->insert(intersection(*itf,*itg)); 949 } 950 } 946 zr.insert(intersection(*itf,*itg)); 951 947 952 948 return zr; … … 963 959 gfan::ZFan* zf = (gfan::ZFan*) u->Data(); 964 960 gfan::ZFan* zg = (gfan::ZFan*) v->Data(); 965 gfan::ZFan* zr = commonRefinement(zf,zg);961 gfan::ZFan* zr = new gfan::ZFan(commonRefinement(*zf,*zg)); 966 962 res->rtyp = fanID; 967 963 res->data = (void*) zr; … … 1058 1054 p->iiAddCproc("","fVector",FALSE,fVector); 1059 1055 p->iiAddCproc("","containsInCollection",FALSE,containsInCollection); 1060 p->iiAddCproc("","tropicalVariety",FALSE,tropicalVariety);1056 // p->iiAddCproc("","tropicalVariety",FALSE,tropicalVariety); 1061 1057 p->iiAddCproc("","commonRefinement",FALSE,commonRefinement); 1062 1058 // iiAddCproc("","grFan",FALSE,grFan); … … 1066 1062 1067 1063 #endif 1064 // gfan::ZFan commonRefinementCompleteFans(const gfan::ZFan &zf, const gfan::ZFan &zg) 1065 // { 1066 // assume(zf->getAmbientDimension() == zg->getAmbientDimension()); 1067 1068 // gfan::ZFan zfg = gfan::ZFan(zf->getAmbientDimension()); 1069 // int d = zf->getAmbientDimension(); 1070 // for (int i=0; i<zf->numberOfConesOfDimension(d,0,1); i++) 1071 // for (int j=0; j<zg->numberOfConesOfDimension(d,0,1); j++) 1072 // { 1073 // gfan::ZCone zc = intersection(zf->getCone(d,i,0,1),zg->getCone(d,j,0,1)); 1074 // if (zc.dimension()==d) zgf.insert(zc); 1075 // } 1076 1077 // return zfg; 1078 // } -
Singular/dyn_modules/gfanlib/bbfan.h
r88615db r1d1f93 14 14 void bbfan_setup(SModulFunctions* p); 15 15 16 bool isCompatible(const gfan::ZFan* zf, const gfan::ZCone* zc); 17 16 18 int getAmbientDimension(gfan::ZFan* zf); 17 19 int getCodimension(gfan::ZFan* zf); … … 21 23 gfan::Matrix<gfan::Integer> rays(const gfan::ZFan* const zf); 22 24 25 gfan::ZFan commonRefinement(gfan::ZFan zf, gfan::ZFan zg); 23 26 #endif 24 27 #endif -
Singular/dyn_modules/gfanlib/bbpolytope.cc
r88615db r1d1f93 9 9 #include <coeffs/bigintmat.h> 10 10 11 #include < bbcone.h>11 #include <callgfanlib_conversion.h> 12 12 #include <sstream> 13 14 // #include <omalloc/omalloc.h>15 // #include <kernel/longrat.h>16 // #include <Singular/subexpr.h>17 // #include <gfanlib/gfanlib.h>18 // #include <kernel/ring.h>19 // #include <kernel/polys.h>20 13 21 14 #include <gfanlib/gfanlib.h> -
Singular/dyn_modules/gfanlib/bbpolytope.h
r88615db r1d1f93 19 19 int getDimension(gfan::ZCone* zc); 20 20 21 gfan::ZVector intStar2ZVectorWithLeadingOne(const int d, const int* i); 22 21 23 #endif 22 24 #endif -
Singular/dyn_modules/gfanlib/gfanlib.cc
r88615db r1d1f93 7 7 #include <bbpolytope.h> 8 8 #include <gitfan.h> 9 #include <tropical.h> 9 10 10 11 #include <Singular/ipid.h> … … 23 24 bbpolytope_setup(p); 24 25 gitfan_setup(p); 26 tropical_setup(p); 25 27 return MAX_TOK; 26 28 } -
Singular/dyn_modules/gfanlib/gitfan.cc
r88615db r1d1f93 14 14 #if HAVE_GFANLIB 15 15 16 #include <callgfanlib_conversion.h> 16 17 #include <bbcone.h> 17 18 #include <bbfan.h> -
Singular/dyn_modules/syzextra/syzextra.cc
r88615db r1d1f93 1794 1794 { 1795 1795 if( UNLIKELY(OPT__TAILREDSYZ && OPT__PROT) ) 1796 { 1796 { 1797 1797 ++ m_stat[5]; // PrintS("%"); // check LCM ! 1798 1798 #ifndef SING_NDEBUG 1799 if( OPT__DEBUG ) 1800 { 1801 PrintS("\nTT,%:"); dPrint(multiplier, r, r, 0); 1802 PrintS(", * :"); dPrint(tail, r, r, 0); 1803 PrintLn(); 1799 if( OPT__DEBUG ) 1800 { 1801 PrintS("\nTT,%:"); dPrint(multiplier, r, r, 0); 1802 PrintS(", * :"); dPrint(tail, r, r, 0); 1803 PrintLn(); 1804 1804 } 1805 1805 #endif … … 1966 1966 if( s == NULL ) // No Reducer? 1967 1967 { 1968 if( UNLIKELY( OPT__TAILREDSYZ && OPT__PROT) ) 1969 { 1968 if( UNLIKELY( OPT__TAILREDSYZ && OPT__PROT) ) 1969 { 1970 1970 ++ m_stat[5]; // PrintS("%"); // check LCM ! 1971 1971 #ifndef SING_NDEBUG 1972 if( OPT__DEBUG ) 1973 { 1974 PrintS("\n%: RedTail("); dPrint(multiplier, r, r, 0); 1975 PrintS(" * : "); dPrint(term4reduction, r,r,0 ); 1972 if( OPT__DEBUG ) 1973 { 1974 PrintS("\n%: RedTail("); dPrint(multiplier, r, r, 0); 1975 PrintS(" * : "); dPrint(term4reduction, r,r,0 ); 1976 1976 PrintS(", { "); dPrint(syztermCheck,r,r,0 ); 1977 PrintS(" }) "); PrintLn(); 1977 PrintS(" }) "); PrintLn(); 1978 1978 } 1979 1979 #endif -
Singular/fevoices.cc
r2f05b5 r1d1f93 88 88 89 89 /*2 90 * init a new voice simil iar to the current90 * init a new voice similar to the current 91 91 */ 92 92 void Voice::Next() -
Singular/fglm.cc
r2f05b5 r1d1f93 172 172 if ( pperm[k] >= 0 ) 173 173 { 174 WerrorS( "param ater names do not agree" );174 WerrorS( "parameter names do not agree" ); 175 175 state= FglmIncompatibleRings; 176 176 } -
Singular/ipassign.cc
r2f05b5 r1d1f93 1699 1699 if(like_lists) 1700 1700 { 1701 if (traceit&TRACE_ASSIGN) PrintS("assign list[..]=...or simil iar\n");1701 if (traceit&TRACE_ASSIGN) PrintS("assign list[..]=...or similar\n"); 1702 1702 if (like_lists==1) 1703 1703 { … … 1735 1735 return (bb==NULL) || bb->blackbox_Assign(l,r); 1736 1736 } 1737 // end of handling elems of list and simil iar1737 // end of handling elems of list and similar 1738 1738 rl=r->listLength(); 1739 1739 if (rl==1) -
Singular/ipshell.cc
r88615db r1d1f93 1138 1138 else 1139 1139 { 1140 //if (name->rtyp!=0) 1141 //{ 1142 // Warn("`%s` is already in use",name->name); 1143 //} 1140 if (TEST_V_ALLWARN 1141 && (name->rtyp!=0) 1142 && (name->rtyp!=IDHDL) 1143 && (currRingHdl!=NULL) && (IDLEV(currRingHdl)==myynest)) 1144 { 1145 Warn("`%s` is %s in %s:%d:%s",name->name,Tok2Cmdname(name->rtyp), 1146 currentVoice->filename,yylineno,my_yylinebuf); 1147 } 1144 1148 { 1145 1149 sy->data = (char *)enterid(id,lev,t,root,init_b); -
Singular/maps_ip.cc
r88615db r1d1f93 22 22 #include <polys/ext_fields/transext.h> 23 23 24 //#include < libpolys/polys/ext_fields/longtrans.h>24 //#include <polys/ext_fields/longtrans.h> 25 25 // #include <kernel/longalg.h> 26 26 -
Singular/number2.h
r88615db r1d1f93 2 2 #define NUMBER2_H 3 3 4 #include < libpolys/misc/auxiliary.h>4 #include <misc/auxiliary.h> 5 5 6 6 #ifdef SINGULAR_4_1 -
Singular/subexpr.cc
r88615db r1d1f93 1651 1651 v->name = id; 1652 1652 } 1653 if (TEST_V_ALLWARN /*&& (myynest>0)*/1654 && ((r_IsRingVar(id, currRing->names,currRing->N)>=0)1655 || ((n_NumberOfParameters(currRing->cf)>0)1656 &&(r_IsRingVar(id, (char**)n_ParameterNames(currRing->cf),1657 n_NumberOfParameters(currRing->cf))>=0))))1658 {1659 // WARNING: do not use ring variable names in procedures1660 Warn("use of variable >>%s<< in a procedure in line %s",id,my_yylinebuf);1661 }1653 //if (TEST_V_ALLWARN /*&& (myynest>0)*/ 1654 //&& ((r_IsRingVar(id, currRing->names,currRing->N)>=0) 1655 // || ((n_NumberOfParameters(currRing->cf)>0) 1656 // &&(r_IsRingVar(id, (char**)n_ParameterNames(currRing->cf), 1657 // n_NumberOfParameters(currRing->cf))>=0)))) 1658 //{ 1659 //// WARNING: do not use ring variable names in procedures 1660 // Warn("use of variable >>%s<< in a procedure in line %s",id,my_yylinebuf); 1661 //} 1662 1662 return; 1663 1663 } -
Tst/Manual/wurzel.res.gz.uu
r88615db r1d1f93 1 begin 664 wurzel.res.gz 2 M'XL("$3I)5$``W=U<GIE;"YR97,`79'-<H(P%(7W/L49IPMM*88?!>N81:<; 3 M9ZP+Y`4B1,T0DDS`J>W3%ZB"TVW.^7+SW>S3C\T.@$>QW;QCS(J*%<R5XC!> 4 MC?:WT*>P0IV08`WB7)W<#%E`D?,CTO77Q?YP.8D6_C+T_)@LO9AXA$R':D@Q 5 MFR&%J*"5_`938,98?14EJX563G.3X2IO1VF%P)\MPH.H>W[NMCQ3.>HSARB- 6 MY"57=<="'Z'D)S-;K4Y)CRPZ)#OSK.B@OWDN,FTMSVK%J^I^]M9#D7O33=:6 7 M,]D(RP?AF$)=R@.WC7/S<#-)G/1!<DF1KD:3V(V".7\AT?2>>(3B_W)>T^>V 8 53%Q"2%,F0[GYCZ?1+\>>?S.=`0`` 1 begin 640 wurzel.res.gz 2 M'XL("//'U%0``W=U<GIE;"YR97,`75%!;L(P$+SG%:NJAZ1-C1T""8WPH>H% 3 MB?80<J],8L`B<2S;"-K7UPF02)QL[<[L[.QLBL_5-P`0"NO5!SQ98U$MMD^9 4 MM[EU(@JN^".DL'Z0>=T+E,+YI/]XC20_(V.9'>!3"L,_1M>A[&C8D3W,G5'0 5 M0NXAAR7@\!)6:NS-*51\!\7RJN(G\V@1DRC%"Y)B@G$P0A,*DPD4(`RTLOX% 6 M)H$II=N+:)@5K0S=),5EU4FU$J;19!YOQ;AOBCH^DQ78`P?1J)HW7-J>"^T. 7 M9/W%U+J5^WR@+'I*>>#EL2==]1"4K=:\M)(;<Z^]WTD$HYO=?*DYJYWA>C1, 8 MW/GEJ=ER[3R[Q96?A\5HDK@,BLSS4Y1,9_P5)\'0<>=^/,Y;\=*!,<(8.S`> 9 9P?&8#9FA/M8NNY/Q29`]>_]D?(IS#`(````` 9 10 ` 10 11 end -
Tst/Manual/wurzel.stat
r88615db r1d1f93 1 1 >> tst_memory_0 :: 1423230963:4012, 64 bit:4.0.1:x86_64-Linux:nepomuck:279304 2 1 >> tst_memory_1 :: 1423230963:4012, 64 bit:4.0.1:x86_64-Linux:nepomuck:2243968 3 1 >> tst_memory_2 :: 1423230963:4012, 64 bit:4.0.1:x86_64-Linux:nepomuck:2313208 4 1 >> tst_timer_1 :: 1423230963:4012, 64 bit:4.0.1:x86_64-Linux:nepomuck:10 -
Tst/Manual/wurzel.tst
r88615db r1d1f93 1 LIB "tst.lib"; 2 tst_init(); 3 1 4 LIB "aksaka.lib"; 2 5 ring R = 0,x,dp; … … 9 12 T; 10 13 7629412809180100-T*T; 11 $ 14 15 tst_status(1);$ 16 -
Tst/New/redTail.res.gz.uu
r88615db r1d1f93 1 1 begin 640 redTail.res.gz 2 M'XL(" />N#%,``W)E9%1A:6PN<F5S`+U538^;,!"]\RM&JQ[,+A",R;?"H>H%3 M J>JAR2W*$AK8!"E+(NQHV5;][QT#L=D-6Z7JMEPP;SPSS_-FS'SQ*?P"`#2`4 M S^%'N!%<./OLV\W4F#<6+P`$HRS/!#&GAGQ#$$"1)HLXVSMY^N1P$0NUGP6@5 M UKX#AZ/(#KGT[/7J-9](Y_0ARU,X\7B;PK$X/!YUA'XKPL"!(LNW\'7F6B5Q6 M '<<WK>2HV0T#R)(TWD,XLTO"S'OOKB2>>5L2W&@W2V8B2#5(%>@VH-QX[VF37 M U:P\TVXVL<:S2N#6-DUC%$`X-<(E75W20-BKX`LN:&&5Y8(06OS5[#4K1/L28 M O:"&AD$3J,U/T1L'T.LU4@`1:;S9:?+4=90)E1#F5)6?8EN<34]QD:,)XXB49 M "R`>NV.M$E`OZ-9:ACQW2_7>%8?3=@=9+N:BB$6Z?>[N!Y`95?A66U%L*RX210 M $F*BI>^.^Q.Z\DC?Y%@XSN6"DX')&1F:=OT8&#$Y;01LBDRD!1*;#&"SB[.\11 M A5`CDOK5\ME:ODC*I]2SM7J15$^)8VOQHA?B:?0-\2(I7JV=?:$=;4T#Q6G`12 M DVQ@0;1]Z,`/]3%RH*5"@WHH<#U%A<:\SIU864`I((195>+'N*S&"\FU=@V413 M +[2=1RI-@>ZN14H+GBWX;EJ0<+6-N5V9F7=-9N9W9F:2D/I`&C_5QUA7SW??14 M N(W>IT-]G)7%^T:^(M)OO)?4]4?]H9P.B@W%.>\8`W8Q!BZFA=M;#)C"NI)@15 M C7PY7AH)'!Y@C?G6?\GLM?>5Y?B?!_I#[?_MY>>W+C\?1T#^C^4_]\1Q.J8O16 5CI>+CL.=7?$J^6#\`H:-ZC[R!P``2 M'XL("'L>U50``W)E9%1A:6PN<F5S`+U5SV_:,!2^\U<\53LX;1+L.`0((H=I 3 METC3#H,;HI"1%"+1@&*CIIOVO_<YI'96:$6U;KG$^=ZOS_[><R;3+_$W`&`1 4 M?(T_PY44TMWF/ZY&G4EC\2)`<)$7N236J*/>$$509NDTR;=ND3VX0B92^_,( 5 M]-IW8;>7^:Y0D=WN<2U"%9S=Y44&!Y&L,]B7N_N]R=!K90A<*/-B#=_'U*X( 6 M=5W?LM.]8=>/($^S9`OQV*D(MVZ]FXIXUG5%T-%IEMQ"D!F0:9`VH'*\]8S) 7 M;E:>Y31.O(FL"]"CS=`81!"/.O&,S4]I(.S5\`D7M/#:<D((+?Y\_)(5HCV% 8 MGE!#0]`D:O/3](81=+N-%$!DEJPVACRCKC:A$K)EP:YXMCPD96&-5!J9"0G$ 9 MXS>\=0+,B\Y+K3(^-TO]WI2[PWH#>2$GLDQDMGX\WPZ@*NKTK:YBV%5"IB3& 10 M0C.?#GLAFWND9PD\-R'40I#`$IST+>?X=#!C>EA)6)6YS$HD%@:PVB1YT4)8 11 M9Z'D.ZKG&/462CTMGF/$6RCQM#:.T6[QAW8&?46[A=+N*)US(AUK#0/#8<"= 12 MK&!*C+WOPB_],7"AI4*#>JCO<8A*@WEG/?%D`:6`&,;U$=\G53U=2*[E%>A8 13 M:`</=)D2PZE-*AL>;?AIV9`*[<;IN<K<NZ0R]\]6YDA(KY'%;_TQ-(?GTU?N 14 MHH]I4!]'9?JQF2_(]$;TC%%_T.NKX6#83T*(,U/`3Z:`8EFXOL:$&2QK!9;( 15 M5^"5D<+N#I983P$0AM,P"-^0[._8OXR^\,C^PZ89?<^NW]E$__82]5N7J(^C 16 9I'[KZM=]$$A>3Y./-\ZGSA/6[0=+&`@````` 17 17 ` 18 18 end -
Tst/Short/bug_358.tst
r88615db r1d1f93 38 38 // test lusolve() for the case that the first columns in U are zero. 39 39 40 matrix B[1][2] = 0,1; 40 matrix B[1][2] = 0,1; 41 41 LD = ludecomp(B); 42 42 P,L,U = LD[1],LD[2],LD[3]; -
Tst/Short/bug_633.res.gz.uu
r88615db r1d1f93 1 1 begin 640 bug_633.res.gz 2 M'XL("`R_1U0``V)U9U\V,S,N<F5S`$V106^"0!"%[_R*B>D![(BN5-N&N(>F 3 M%Y*F%WMK&EEDI6L0R.X"ZJ_O8`FXEYW,^_)>]NWVZSWZ!`#&X2-Z@XDUUL]5 4 M,@F=;:\L.=!RIPIE72]TNALXAZ3.=NL@\`O9^L8*._`!AV%^\J&LK"H+MQ6Z 5 M\$;3U1VT]KMH=R+R3"9:W.+OT&<.JK!0P08J35,N&YF/\@L'VF:@25^@*S#! 6 MO8>I&8G7GC#_Q!DO>,4:&VR)JP:.+2@HE2*'B,#SK,5ZV3XRO%QGS0A13R=1 7 M0?6K"-(8C0KUI`S5=)1[JQKI$H*:WC&?PW1*3]AK*8SL(QC,.`2TA>X<OT\_ 8 MFT7HL,'LKD1&)0[SRK]]1E=X;5SFA?#0!]3D'5,],9D:*T4*Y0'B5!YBYP]/ 9 '2HW)Y`$````` 2 M'XL("`D?U50``V)U9U\V,S,N<F5S`$V106^#,`R%[_P*"^T`G:&DK-TFU!RF 3 M79"F7;K;-%6!1BP5I2@)T/;7SW0(R"66WR<_^7GW]9Y^`@#C\)&^@6N-#4N5 4 MN8FS&Y05!VKN5:6LYR=._P/GD#7%?A/'826[T%AA1S[F,-9/(9QKJ\Z5UPE= 5 M^=/0]0S:A+VUYXJRD)D6=_L9^LQ!519JV$*MJ2IE*\M)?N%`W0(TZ1%Z`C/, 6 M?3R8B7@="/-/7/"*-VRPQ8ZX>N181$8'*4I(";P$'3:K[I'A]1:T$T0YG40- 7 M]:\B2&,Z*923,A334>96M=(C!#7ML5S"8D$KY%H*(P<+!@&'F+K0O^/WZ6<; 8 @)0X;A\U"9!3B6*_#^S'ZP!OC,3^!!^</SC8.9<,!```` 10 9 ` 11 10 end -
Tst/Short/bug_tr679.tst
r88615db r1d1f93 60 60 L1 = primdecGTZ (I); 61 61 L2 = primdecSY (I); 62 "equivalent?",primDecsAreEquivalent (L1,L2) ; 62 "equivalent?",primDecsAreEquivalent (L1,L2) ; 63 63 } 64 64 -
Tst/Short/test_unit_ideal_decomposition.tst
r88615db r1d1f93 97 97 ///////////////////////////////////////////////////////////////////////////////////////// 98 98 ring rng1 = 0,(x,y),dp; 99 ideal I = x+y,x+1,y; 99 ideal I = x+y,x+1,y; 100 100 101 101 list pr = primdecGTZE(I); … … 159 159 ///////////////////////////////////////////////////////////////////////////////////////// 160 160 ring rng2 = 0,(x,y),dp; 161 ideal I = x+y,x+1,y; 161 ideal I = x+y,x+1,y; 162 162 163 163 if (defined(pr)) {kill pr;} 164 164 list pr = primdecGTZE(I); 165 165 166 166 testPrimdecUnitOrigBehaviour( primdecGTZ,I ); 167 167 testPrimdecUnitOrigBehaviour( primdecGTZkeepKomp,I ); … … 181 181 ///////////////////////////////////////////////////////////////////////////////////////// 182 182 183 183 184 184 ring rng3 = 0,(x,y),ds; 185 ideal I = x+y,x+1,y; 185 ideal I = x+y,x+1,y; 186 186 187 187 // illegal ASSUME(0, testPrimaryE(pr,I) ); … … 205 205 206 206 testPrimdecUnit( primdecGTZ,I ,0); 207 //testPrimdecUnit( primdecGTZkeepKomp,I ,0); 207 //testPrimdecUnit( primdecGTZkeepKomp,I ,0); 208 208 testPrimdecUnit( minAssGTZ, I ,0); 209 // testPrimdecUnit( minAssGTZFacSTD, I ,0); 210 // testPrimdecUnit( minAssGTZnoFacSTD, I ,0); 211 // testPrimdecUnit( minAssGTZGTZ, I ,0); 212 // testPrimdecUnit( minAssGTZorigNoFacSTD, I ,0); 209 // testPrimdecUnit( minAssGTZFacSTD, I ,0); 210 // testPrimdecUnit( minAssGTZnoFacSTD, I ,0); 211 // testPrimdecUnit( minAssGTZGTZ, I ,0); 212 // testPrimdecUnit( minAssGTZorigNoFacSTD, I ,0); 213 213 testPrimdecUnit( primdecSY, I ,0); 214 214 testPrimdecUnit( primdecSYNoOptimalOrdering, I ,0); 215 215 testPrimdecUnit( minAssChar,I ,0); 216 216 testPrimdecUnit( minAssCharNoOptimalOrdering,I ,0); 217 // invalid: testPrimdecUnit( minAssPrimesOrig,I ,0); 218 ///////////////////////////////////////////////////////////////////////////////////////// 219 ///////////////////////////////////////////////////////////////////////////////////////// 220 221 ring rng4 = (7,a),(x,y,z),dp; 217 // invalid: testPrimdecUnit( minAssPrimesOrig,I ,0); 218 ///////////////////////////////////////////////////////////////////////////////////////// 219 ///////////////////////////////////////////////////////////////////////////////////////// 220 221 ring rng4 = (7,a),(x,y,z),dp; 222 222 minpoly = 1*a^2+6*a^1+3*a^0; 223 ideal I = x+y,x+1,y; 223 ideal I = x+y,x+1,y; 224 224 225 225 testPrimdecUnitNewBehaviour( wDecompE, I ); … … 250 250 testPrimdecUnitOrigBehaviour( wDecomp, I ); 251 251 testPrimdecUnitOrigBehaviour( primdecGTZ,I ); 252 testPrimdecUnitOrigBehaviour( primdecGTZkeepKomp,I ); 252 testPrimdecUnitOrigBehaviour( primdecGTZkeepKomp,I ); 253 253 testMinAssUnitOrigBehaviour ( minAssGTZ, I ); 254 testMinAssUnitOrigBehaviour ( minAssGTZFacSTD, I ); 255 testMinAssUnitOrigBehaviour ( minAssGTZnoFacSTD, I ); 256 testMinAssUnitOrigBehaviour ( minAssGTZGTZ, I ); 257 testMinAssUnitOrigBehaviour ( minAssGTZorigNoFacSTD, I ); 254 testMinAssUnitOrigBehaviour ( minAssGTZFacSTD, I ); 255 testMinAssUnitOrigBehaviour ( minAssGTZnoFacSTD, I ); 256 testMinAssUnitOrigBehaviour ( minAssGTZGTZ, I ); 257 testMinAssUnitOrigBehaviour ( minAssGTZorigNoFacSTD, I ); 258 258 testPrimdecUnitOrigBehaviour( primdecSY, I ); 259 259 testPrimdecUnitOrigBehaviour( primdecSYNoOptimalOrdering, I ); … … 276 276 ///////////////////////////////////////////////////////////////////////////////////////// 277 277 ///////////////////////////////////////////////////////////////////////////////////////// 278 278 279 279 ring rng5 = (7,a),(x,y,z),ds; minpoly = a^2 + a+3; 280 ideal I = x+y,x+1,y; 280 ideal I = x+y,x+1,y; 281 281 282 282 testPrimdecUnitNewBehaviour( primdecGTZE,I ); -
Tst/Short/zerored.res.gz.uu
r88615db r1d1f93 1 begin 644 zerored.res.gz 2 M'XL("#^ORU```WIE<F]R960N<F5S`.U7WVL;1Q!^]U]QA#XX.E79^;&SNPWU 3 M0RF40"DE3E_Z(&@<Q1A<6SB.;>FO[\S>Z?9.TEU-FCX4:C":U?Z:;^?[9D;G 4 M[WY\\TM557!6_?SFA^K%W=7-Y>7[Q?75^Q>O3\[;23RK[/OJ[4_5]]7IU<W] 5 MZG)U-Z_$>Y)Y!:WU<EZ=/LTW\ZT:']9E-YU5KUY5O]Y>;VYN_[SZX[J"[[HY 6 M7E1KG:C6H"=32!X$`7#VM*3:QX`.O8B.<+:I,9$XP.AI]C3;S+8U8H3@@(*N 7 MJ#W'(`$@S3:Z%R2$@"`ZP!HE,GGV8KNJ[J\&<`&3H$W4C,Q"7CC.MGK`8(CE 8 MO&W!Y?=Q8<$E.URHN$!878LL_#Q<0(R@U\6O``M="N#1.9=A#8;'884]6%10 9 MQ1TJ^L^A2F?5=G5W^W;UX?/%ZG0-WZ[QY>L3MYL'=S!/@WD8SN/^O$JDLVFA 10 M+Y@%<W>HEQ&5@"JAT=A@"ZJ\1K<<$+`("Z0O+!"*%B6N-_KO`S'K0W&=(VCA 11 MR4$`#!:!_(0QB;>P6MP2!M\$54<>DMM%E#!(;&:JFEV2YOG;KW,T.6E<;$G- 12 M433:Q?E]FO74`[&OGE%7"%)*K?='W%*:&-IF=(AP]SUF=C7>]9ZF@U,\3OL> 13 M%V6@ZROC'WH\]+/UK`GA-L/(5N<7PC2U$:>IC31-;>1";?2+8DO+V$_'2?XP 14 M?YP?82WFP.>-Y\>I/K8Q+D;ICJE/=_26"1YR&J)`B&9KM0!6:_9H+'::VF>/ 15 M.6V)/O:C98T0DEKMIZ4TL8-R\+8U@YA42CYJCK-((L7@,MM]LFRX:1=OF\,[ 16 M`.3&*4_0IWP?`'O/!_XWA'E07WV,&0?ZZ-,(#DSZ""V.3K,%R8Y]VSI&H^>7 17 M0,-Q;1#UM?'O0^M5C5W4O@013ZN*_+2J2*951:&HBF)7,.Z/:NEB(`1*K?#> 18 M'=7/<#$?D*ZHAF%0)%01%TM1U@=DM;P^<]('O;"4%$5`+>V+R"=22Q.30UNG 19 M=5W;L'+?`1,*R9D&75%[GZ?HFNM\Y'P;$U+(MZDK+DW=QN.\8S_H5D9O`\>2 20 M]FX+UG\<7";3E.`P30F.TY3@5"CA71OCSZ,=Q#`[>NC2ZF^C'<3>%AQ/J)[Z 21 MU#")Y/9!/[-%UH-E)>?29M(TSW*A;]?,<O&UIBT7MGQ$KFYYH6W14BM<O#D( 22 M92&.]WWB'/4F"DAQINUW+,D4QS!BZQ;G^)I;G@ABZVI"=\PO&:>8#WV*?4V_ 23 M_OZYXC09_6'#.R";N&DR"A0RR@119$>4CR8RAP8O-F`!I1TI1#$>+*/F?&<0 24 MEZ'!)#&O"5V'HW;;>STM&]Q-3Y9'7?62FI18ML8W=^G%[:B.&D@S:U*%VY?< 25 M+6D&^G.!8Y[H3J'!*51.H>Q,%\"=][EZE=:V\;?O;?&UBY@,*\K'P6O[WFM+ 26 MZ;$DV,N/_C"74CB>FR<DV9;_(_:<B`5G;W6_^G3_N\8M1VPWHY7SFY._`/08 27 &VPX\$0`` 1 begin 640 zerored.res.gz 2 M'XL("%#(U%0``WIE<F]R960N<F5S`.U:6VOK1A!^SZ]80A\<RW5V9^\)3:$4 3 MRH%2RLGI2TO3^"(;<1+)M14G]J_O[$K62K:5VSFE%!0(WO7>OAGO]\UH[.M/ 4 M/W[XA1#"KLC/'WXXS5?Y\"X9GUZ>7)<#X`?(Z3))Y_/QWB"_(E5;#`FN_BM) 5 MD[QW=GGB7LG5%=G&RVP93X=I_#A<Y:.\FB]K:]60N/W)QY_(=Z27I'D\CY<# 6 MHJ3D:D!8V3H;D-[38#/88F.Z""CT%3D_)[]F=YLTNT]&=X1=5&-F2!8X0!8, 7 M=^;:2J:`,>@_W?!(&@T4I%+8@_XF`LL596`D[S_U-_UM!&"8IHQKG!%)8;32 8 MC-G^!M<RI;4&IK`#$2@CN!12N56D^HL8HQJL`C<0"1!"<:F$Z6]Q@T87PG[; 9 M8)?=MPLJNQC=V05H%U,"H1FAQ.OL8EP`P^/,5S`+J-5,`J74F]7H'C6+L3VS 10 M>+`*=E;Q_YU5O+CJ'^/IPR3N+=BW"T`6X,;?DVFR3E9)EI(L1=NF\2Q)XRG) 11 MUO&23+)X-DLF29SF9)K=CY)T5:R)ET@;DDTF#TMD#TEP\9*,XQERB00J7ES@ 12 M7M/?\5SG3G*'&^,EOR"WA,S1@W?Q:'J?H9=[LS-R7NO.STB?S"]OB[/P_;5C 13 M7]N^;M;J<[)8N$EY_)23V3*[)[>7MR7,44[R['.<DMNS9[8,[JF<)@Z<QCNG 14 MO>0TV70:%$ZCU;@*PLKT$+GFI75YJ*PM>LK,3HT;2P"%N'7)@50%"09:EV"F 15 MN'%\%M$&_Z7F0B"E1.2Y[HCLZ<I`.ZYZLAFKI!,`QW`+6A;TQYYDENZXST$K 16 M4XR02%"K"J*6;WO>"XL,=E,B813J0@4>]@6IIK,`=9UMA<*9M;9$?P06"HJS 17 MMN@=6KA['[P.%>AJKJG,"8CY/N*@H2#J&OJ%B)LX2V3%1[CU9OA6P"7;13#- 18 MD+<ITM>3VG-AG,SQ=B$+R.Z2P8"IBOY#,MX0^L7,9I[9Z</]&*7C[Y+@3D(* 19 M?D]'^>@/]N=_3FM0[5K8^>X%W^FCDMCY[C6^,R%<@!U6;4[+*+`Z'CC6@\?! 20 MD4C`O9CZA=?'PT?;0ABVAA#.ZR$$I,O#UCX)Y)H#N#;FZDQ@J__H(@/%Q+K_ 21 MZ)-&A0+VZ'(VK2VVRE>74"JWD1?$;228<N$G9(/%=DX=@1M-?021UN6BFW+R 22 MMM@\&"#:PPB7]3!2-T!(*0[P%R*\1JS2&&\'2"-MBQU@T0FE'54<#);L%'T; 23 M&>,D_SVFJ?9XPW4]WOS[IM5R]MVG]AZ+3)>NOUDJN.W2]3<[3=#VV-0YK<UI 24 M+`0E`=4S3'XT%$T:<43P,FY].AI^]B8?:'8(.D(VGELPH$QN%`8-#0);$E7* 25 MHAY-7)9LE&+8XI'@TG)L8:Y,P<V+&`?#PGD'0AIBA-"-DDYYGN2&%L=)(_QI 26 M@@/7_C2$0NUSIYEVV1:V46II/8U1H>S>:=H53_8/D[3+_=][W27K<O]W^PZZ 27 MW/_=OJO5[Z4H=?.AM5#43-BEK#+]WUH+17M+5'N.+W5=;EW6YJM$^.I;W!5E 28 M?7+I*Q@N6W3(?#VGG-/W-197Q?7U"[^%+V+XB6X)%Y@3!C0'\AC$6-JZ&!]% 29 M8Q13`4Q9UG)Y;P`&!DI8PFNF@R4Y9Z:$:H$>P:5HNVPK5I?MKXGK17<IZ%+F 30 M-S-,'7XMT&5_+SI-="GSVYU6^SY5/:.S:J>S,Y?W47#J8`JM8*#*'BJ$<C)Z 31 M8_`IGCJ%N-&%)"CCY^BJ#HSMLD+]=%/(1E&Y]KVJ'J$BCKKLYLCB+#RX[$4& 32 M==`U(XY)IWM35%.*3@14&#]0[<(;N_"P"_=@*OW;H??UB/`%0(&WCC9@#8+7 33 MK!',NBOXTA6TX0IJ&DJ)FKGKV/HK`AT>\%Z;>VCNEG37^#776`OGJSQ>Y>X" 34 @^&N\&Y&UST@5/]]P/]%X6/78V>4W)_\`:`[>OQPB```` 28 35 ` 29 36 end -
Tst/Short/zerored.stat
r88615db r1d1f93 1 1 >> tst_memory_0 :: 1423231056:4012, 64 bit:4.0.1:x86_64-Linux:nepomuck:278832 2 1 >> tst_memory_1 :: 1423231056:4012, 64 bit:4.0.1:x86_64-Linux:nepomuck:2242304 3 1 >> tst_memory_2 :: 1423231056:4012, 64 bit:4.0.1:x86_64-Linux:nepomuck:2293480 4 1 >> tst_timer_1 :: 1423231056:4012, 64 bit:4.0.1:x86_64-Linux:nepomuck:3 -
Tst/Short/zerored.tst
r88615db r1d1f93 1 LIB"tst.lib"; 1 2 LIB "ringgb.lib"; 3 4 tst_init(); 5 2 6 ring RG = (integer, 65536, 1, 65536), (x,y,z), dp; 3 7 // Polynomial 1: … … 69 73 //poly f = 1024*x^8*y^2+11264*x^8*y+28672*x^8+45056*x^7*y^2+36864*x^7*y+16384*x^7+40960*x^6*y^2+57344*x^6*y+32768*x^6+30720*x^5*y^2+10240*x^5*y+8192*x^5+35840*x^4*y^2+1024*x^4*y+20480*x^4+30720*x^3*y^2+10240*x^3*y+8192*x^3+4096*x^2*y^2+45056*x^2*y+49152*x^2+40960*x*y^2+57344*x*y+32768*x; 70 74 //testZero(f); 71 $ 75 76 tst_status(1);$ -
gfanlib/gfanlib_matrix.h
r88615db r1d1f93 9 9 #define LIB_ZMATRIX_H_ 10 10 11 #include <sstream> 11 12 #include <vector> 12 13 #include <algorithm> … … 19 20 std::vector<Vector<typ> > rows; 20 21 public: 22 // rowIterator; 23 // std::vector<Vector<typ> >::iterator rowsBegin(){return rows.begin();} 24 // std::vector<Vector<typ> >::iterator rowsEnd(){return rows.end();} 21 25 inline int getHeight()const{return height;}; 22 26 inline int getWidth()const{return width;}; … … 32 36 Matrix():width(0),height(0){ 33 37 }; 34 staticMatrix rowVectorMatrix(Vector<typ> const &v)38 Matrix rowVectorMatrix(Vector<typ> const &v) 35 39 { 36 40 Matrix ret(1,v.size()); 37 for( inti=0;i<v.size();i++)ret[0][i]=v[i];41 for(unsigned i=0;i<v.size();i++)ret[0][i]=v[i]; 38 42 return ret; 39 43 } … … 68 72 } 69 73 void appendRow(Vector<typ> const &v) 70 { 71 assert((int)v.size()==width); 72 rows.push_back(v); 73 height++; 74 } 74 { 75 assert((int)v.size()==width); 76 rows.push_back(v); 77 height++; 78 } 79 void prependRow(Vector<typ> const &v) 80 { 81 assert((int)v.size()==width); 82 rows.insert(rows.begin(),v); 83 height++; 84 } 75 85 void eraseLastRow() 76 86 { 77 87 assert(rows.size()>0); 78 rows. resize(rows.size()-1);88 rows.pop_back(); 79 89 height--; 80 90 } … … 184 194 return f; 185 195 } 196 197 std::string toString()const 198 { 199 std::stringstream f; 200 f<<*this; 201 return f.str(); 202 } 203 186 204 /** 187 205 Swaps the i th and the j th row. … … 296 314 } 297 315 /** 298 Performs a Gauss reduction and returns the number of row swaps 299 done. 316 Performs a Gauss reduction and returns the number of row swaps (and negative scalings) 317 done. The result is a matrix in row echelon form. The pivots may 300 318 not be all 1. In terms of Groebner bases, what is computed is a 301 319 minimal (not necessarily reduced) Groebner basis of the linear … … 309 327 { 310 328 assert(integral || typ::isField()); 329 assert(!makePivotsOne || !integral); 330 311 331 int retSwaps=0; 312 332 int currentRow=0; … … 325 345 if(makePivotsOne) 326 346 {//THE PIVOT SHOULD BE SET TO ONE IF INTEGRAL IS FALSE 327 if(rows[currentRow][i].sign()>=0) 328 retSwaps++; 347 if(rows[currentRow][i].sign()>=0)retSwaps++; 329 348 typ inverse=typ(1)/rows[currentRow][i]; 330 349 // if(!rows[currentRow][i].isOne()) … … 517 536 int reduceAndComputeRank() 518 537 { 519 if (typ::isField()) 520 reduce(); 521 else 522 reduce(false,true,false); 538 reduce(false,!typ::isField(),false); 523 539 int ret=0; 524 540 int pivotI=-1; -
gfanlib/gfanlib_polyhedralfan.cpp
r88615db r1d1f93 398 398 std::set<int> indices; 399 399 400 //for(int j=0;j<rays.getHeight();j++)if(cone.contains(rays[j]))indices.insert(j);400 // for(int j=0;j<rays.getHeight();j++)if(cone.contains(rays[j]))indices.insert(j); 401 401 402 402 ZMatrix l=cone.extremeRays(&generatorsOfLinealitySpace); … … 502 502 } 503 503 504 std::string PolyhedralFan::toString(int /*flags*/)const504 std::string PolyhedralFan::toString(int flags)const 505 505 //void PolyhedralFan::printWithIndices(class Printer *p, bool printMultiplicities, SymmetryGroup *sym, bool group, bool ignoreCones, bool xml, bool tPlaneSort, vector<string> const *comments)const 506 506 { … … 862 862 int PolyhedralFan::dimensionOfLinealitySpace()const 863 863 { 864 if(cones.size()) //slow! 865 return 0; 866 else 867 return cones.begin()->dimensionOfLinealitySpace(); 864 assert(cones.size());//slow! 865 return cones.begin()->dimensionOfLinealitySpace(); 868 866 } 869 867 -
gfanlib/gfanlib_polyhedralfan.h
r88615db r1d1f93 24 24 typedef std::map<int,IntVectorList> IncidenceList; 25 25 26 class PolyhedralFan ; 27 26 class PolyhedralFan; 28 27 PolyhedralFan refinement(const PolyhedralFan &a, const PolyhedralFan &b, int cutOffDimension=-1, bool allowASingleConeOfCutOffDimension=false); 29 28 … … 55 54 int getMaxDimension()const; 56 55 int getMinDimension()const; 57 58 // friend PolyhedralFan refinement(const PolyhedralFan &a, const PolyhedralFan &b, int cutOffDimension=-1, bool allowASingleConeOfCutOffDimension=false); 59 56 // friend PolyhedralFan refinement(const PolyhedralFan &a, const PolyhedralFan &b, int cutOffDimension=-1, bool allowASingleConeOfCutOffDimension=false); 60 57 ZMatrix getRays(int dim=1);//This can be called for other dimensions than 1. The term "Rays" still makes sense modulo the common linearity space 61 58 ZMatrix getRelativeInteriorPoints(); -
gfanlib/gfanlib_polymakefile.cpp
r88615db r1d1f93 9 9 10 10 #include <assert.h> 11 #include <stdio.h> 11 12 #include <sstream> 12 13 #include <istream> 13 #include <stdio.h>14 14 15 15 using namespace std; … … 53 53 list<int> ret; 54 54 int c=s.peek(); 55 while(((c>='0') && (c<='9')) 55 while(((c>='0') && (c<='9'))|| (c==' ')) 56 56 { 57 57 // fprintf(Stderr,"?\n"); … … 171 171 else 172 172 { 173 //fprintf(f,"_application %s\n",application.c_str());174 //fprintf(f,"_version 2.2\n");175 //fprintf(f,"_type %s\n",type.c_str());173 fprintf(f,"_application %s\n",application.c_str()); 174 fprintf(f,"_version 2.2\n"); 175 fprintf(f,"_type %s\n",type.c_str()); 176 176 177 177 for(list<PolymakeProperty>::const_iterator i=properties.begin();i!=properties.end();i++) … … 201 201 else 202 202 { 203 //file << "_application " << application << endl;204 //file << "_version 2.2\n";205 //file << "_type " << type << endl;203 file << "_application " << application << endl; 204 file << "_version 2.2\n"; 205 file << "_type " << type << endl; 206 206 207 207 for(list<PolymakeProperty>::const_iterator i=properties.begin();i!=properties.end();i++) -
gfanlib/gfanlib_q.h
r88615db r1d1f93 31 31 { 32 32 mpq_init(value); 33 // mpz_init_set_si(mpq_numref(value), value_); 34 // mpz_init_set_ui(mpq_denref(value), 1); 33 35 mpz_set_si(mpq_numref(value), value_); 34 36 mpz_set_ui(mpq_denref(value), 1); … … 48 50 { 49 51 mpq_init(value); 52 // mpz_init_set(mpq_numref(value), value_.value); 53 // mpz_init_set_ui(mpq_denref(value), 1); 50 54 mpz_set(mpq_numref(value), value_.value); 51 55 mpz_set_ui(mpq_denref(value), 1); … … 156 160 return mpq_sgn(value); 157 161 } 158 static Rational gcd(Rational const &a, Rational const /*&b*/, Rational /*&s*/, Rational /* t*/)162 static Rational gcd(Rational const &a, Rational const /*&b*/, Rational /*&s*/, Rational /*&t*/) 159 163 { 160 164 /* mpz_t r; -
gfanlib/gfanlib_symmetriccomplex.cpp
r88615db r1d1f93 59 59 sum+=vertices[indices[i]]; 60 60 61 intn=sum.size();61 unsigned n=sum.size(); 62 62 Permutation const &bestPermutation=sortKeyPermutation; 63 63 64 assert( (int)bestPermutation.size()==n);64 assert(bestPermutation.size()==n); 65 65 66 66 IntVector indicesNew(indices.size()); … … 88 88 bool SymmetricComplex::Cone::isSubsetOf(Cone const &c)const 89 89 { 90 intnext=0;90 unsigned next=0; 91 91 for(unsigned i=0;i<indices.size();i++) 92 92 { 93 93 while(1) 94 94 { 95 if(next>= (int)c.indices.size())return false;95 if(next>=c.indices.size())return false; 96 96 if(indices[i]==c.indices[next])break; 97 97 next++; … … 183 183 184 184 185 int SymmetricComplex::getLinDim()const 186 { 187 return linealitySpace.getHeight(); 188 } 189 185 190 int SymmetricComplex::getMaxDim()const 186 191 { … … 199 204 } 200 205 201 202 int SymmetricComplex::getLinDim()const203 {204 ZMatrix zm=linealitySpace;205 return zm.reduceAndComputeRank();206 }207 206 208 207 bool SymmetricComplex::isMaximal(Cone const &c)const … … 248 247 #endif 249 248 250 void SymmetricComplex::buildConeLists(bool onlyMaximal, bool compressed, std::vector<std::vector<IntVector > >*conelist /*, ZMatrix *multiplicities*/)const249 void SymmetricComplex::buildConeLists(bool onlyMaximal, bool compressed, std::vector<std::vector<IntVector > >*conelist, std::vector<std::vector<Integer > > *multiplicities)const 251 250 { 252 251 int dimLow=this->linealitySpace.getHeight(); … … 254 253 if(dimHigh<dimLow)dimHigh=dimLow-1; 255 254 if(conelist)*conelist=std::vector<std::vector<IntVector> >(dimHigh-dimLow+1); 255 if(multiplicities)*multiplicities=std::vector<std::vector<Integer> >(dimHigh-dimLow+1); 256 256 for(int d=dimLow;d<=dimHigh;d++) 257 257 { … … 262 262 int I=0; 263 263 for(ConeContainer::const_iterator i=cones.begin();i!=cones.end();i++,I++) 264 if(i->dimension==d)265 {266 numberOfOrbitsOfThisDimension++;264 if(i->dimension==d) 265 { 266 numberOfOrbitsOfThisDimension++; 267 267 if(!onlyMaximal || isMaximal(*i)) 268 268 { … … 270 270 // bool isMax=isMaximal(*i); 271 271 // bool newOrbit=true; 272 std::set<std:: set<int> > temp;273 for(SymmetryGroup::ElementContainer::const_iterator k=sym.elements.begin();k!=sym.elements.end();k++)274 {272 std::set<std::pair<std::set<int>,Integer> > temp; 273 for(SymmetryGroup::ElementContainer::const_iterator k=sym.elements.begin();k!=sym.elements.end();k++) 274 { 275 275 Cone temp1=i->permuted(*k,*this,false); 276 temp.insert( temp1.indexSet());276 temp.insert(std::pair<std::set<int>,Integer>(temp1.indexSet(),temp1.multiplicity)); 277 277 if(compressed)break; 278 278 } 279 for(std::set<std:: set<int> >::const_iterator j=temp.begin();j!=temp.end();j++)279 for(std::set<std::pair<std::set<int>,Integer> >::const_iterator j=temp.begin();j!=temp.end();j++) 280 280 { 281 281 IntVector temp; 282 for(std::set<int>::const_iterator k=j-> begin();k!=j->end();k++)temp.push_back(*k);282 for(std::set<int>::const_iterator k=j->first.begin();k!=j->first.end();k++)temp.push_back(*k); 283 283 if(conelist)(*conelist)[d-dimLow].push_back(temp); 284 if(multiplicities)(*multiplicities)[d-dimLow].push_back(j->second); 284 285 /* if(isMax)if(multiplicities) 285 286 { … … 293 294 // newDimension=false; 294 295 } 295 296 }297 } 298 } 299 300 } 301 302 std::string SymmetricComplex::toStringJustCones(int dimLow, int dimHigh, bool onlyMaximal, bool group, std::ostream *multiplicities, bool compressed, bool /*tPlaneSort*/)const296 } 297 } 298 } 299 } 300 301 } 302 303 std::string SymmetricComplex::toStringJustCones(int dimLow, int dimHigh, bool onlyMaximal, bool group, std::ostream *multiplicities, bool compressed, bool tPlaneSort)const 303 304 { 304 305 std::stringstream ret; … … 365 366 366 367 367 std::string SymmetricComplex::toStringJustRaysAndMaximalCones(int flags)const368 {369 PolymakeFile polymakeFile;370 polymakeFile.create("NONAME","PolyhedralFan","PolyhedralFan",flags&FPF_xml);371 polymakeFile.writeMatrixProperty("RAYS",vertices,true);372 polymakeFile.writeStringProperty("MAXIMAL_CONES",toStringJustCones(getMinDim(),getMaxDim(),true,flags&FPF_group, 0,false,flags&FPF_tPlaneSort));373 374 std::stringstream s;375 polymakeFile.writeStream(s);376 return s.str();377 }378 379 380 368 ZVector SymmetricComplex::fvector(bool boundedPart)const 381 369 { … … 538 526 polymakeFile.writeCardinalProperty("LINEALITY_DIM",linealitySpace.getHeight()); 539 527 // polymakeFile.writeMatrixProperty("RAYS",rays,true,comments); 540 polymakeFile.writeMatrixProperty("RAYS",vertices,true);528 polymakeFile.writeMatrixProperty("RAYS",vertices,true); 541 529 polymakeFile.writeCardinalProperty("N_RAYS",vertices.getHeight()); 542 530 … … 606 594 607 595 608 polymakeFile.writeStringProperty("CONES",toStringJustCones(getMinDim(),getMaxDim(),false,flags&FPF_group, 0,false,flags&FPF_tPlaneSort)); 609 polymakeFile.writeStringProperty("MAXIMAL_CONES",toStringJustCones(getMinDim(),getMaxDim(),true,flags&FPF_group, 0,false,flags&FPF_tPlaneSort)); 610 polymakeFile.writeStringProperty("CONES_ORBITS",toStringJustCones(getMinDim(),getMaxDim(),false,flags&FPF_group, 0,true,flags&FPF_tPlaneSort)); 611 polymakeFile.writeStringProperty("MAXIMAL_CONES_ORBITS",toStringJustCones(getMinDim(),getMaxDim(),true,flags&FPF_group, 0,true,flags&FPF_tPlaneSort)); 596 if(flags&FPF_cones)polymakeFile.writeStringProperty("CONES",toStringJustCones(getMinDim(),getMaxDim(),false,flags&FPF_group, 0,false,flags&FPF_tPlaneSort)); 597 std::stringstream multiplicities; 598 if(flags&FPF_maximalCones)polymakeFile.writeStringProperty("MAXIMAL_CONES",toStringJustCones(getMinDim(),getMaxDim(),true,flags&FPF_group, &multiplicities,false,flags&FPF_tPlaneSort)); 599 if(flags&FPF_conesCompressed)polymakeFile.writeStringProperty("CONES_ORBITS",toStringJustCones(getMinDim(),getMaxDim(),false,flags&FPF_group, 0,true,flags&FPF_tPlaneSort)); 600 if((flags&FPF_conesCompressed) && (flags&FPF_maximalCones))polymakeFile.writeStringProperty("MAXIMAL_CONES_ORBITS",toStringJustCones(getMinDim(),getMaxDim(),true,flags&FPF_group, 0,true,flags&FPF_tPlaneSort)); 601 if(flags&FPF_multiplicities)polymakeFile.writeStringProperty("MULTIPLICITIES",multiplicities.str()); 612 602 613 603 if(!sym.isTrivial()) … … 647 637 stringstream multiplicities; 648 638 polymakeFile.writeStringProperty("MAXIMAL_CONES",symCom.toString(symCom.getMinDim(),symCom.getMaxDim(),true,flags&FPF_group, &multiplicities,false,flags&FPF_tPlaneSort)); 649 if(flags&FPF_multiplicities)polymakeFile.writeStringProperty("MULTIPLICITIES",multiplicities.str());650 639 // log1 fprintf(Stderr,"Done producing list of maximal cones.\n"); 651 640 } -
gfanlib/gfanlib_symmetriccomplex.h
r88615db r1d1f93 36 36 class SymmetricComplex{ 37 37 int n; 38 ZMatrix linealitySpace; 38 ZMatrix linealitySpace; // Has full row rank. 39 39 ZMatrix vertices; 40 40 std::map<ZVector,int> indexMap; … … 85 85 bool isPure()const; 86 86 ZVector fvector(bool boundedPart=false)const; 87 void buildConeLists(bool onlyMaximal, bool compressed, std::vector<std::vector<IntVector > >*conelist /*, ZMatrix *multiplicities*/)const;87 void buildConeLists(bool onlyMaximal, bool compressed, std::vector<std::vector<IntVector > >*conelist, std::vector<std::vector<Integer > > *multiplicities=0)const; 88 88 std::string toStringJustCones(int dimLow, int dimHigh, bool onlyMaximal, bool group, std::ostream *multiplicities=0, bool compressed=false, bool tPlaneSort=false)const; 89 std::string toStringJustRaysAndMaximalCones(int flags=0)const;90 89 std::string toString(int flags=0)const; 91 90 bool isSimplicial()const; -
gfanlib/gfanlib_symmetry.cpp
r88615db r1d1f93 352 352 return ret; 353 353 } 354 #if 0 355 IntegerVector SymmetryGroup::orbitRepresentativeFixing(IntegerVector const &v, IntegerVector const &fixed)const354 355 ZVector SymmetryGroup::orbitRepresentativeFixing(ZVector const &v, ZVector const &fixed)const 356 356 { 357 357 if(trie){ 358 return compose(trie->searchStabalizer(v,fixed),v);359 } 360 IntegerVector ret=v;358 return trie->searchStabalizer(v,fixed).apply(v); 359 } 360 ZVector ret=v; 361 361 362 362 for(ElementContainer::const_iterator i=elements.begin();i!=elements.end();i++) 363 if( compose(*i,fixed)==fixed)363 if(i->apply(fixed)==fixed) 364 364 { 365 IntegerVector q=compose(*i,v);365 ZVector q=i->apply(v); 366 366 if(ret<q)ret=q; 367 367 } 368 368 if(trie){ 369 IntegerVector temp=compose(trie->searchStabalizer(v,fixed),v);369 ZVector temp=trie->searchStabalizer(v,fixed).apply(v); 370 370 // debug<<"Input"<<v; 371 371 // debug<<"Brute"<<ret; … … 376 376 return ret; 377 377 } 378 #endif379 378 380 379 bool Permutation::isPermutation(IntVector const &a) -
gfanlib/gfanlib_vector.h
r88615db r1d1f93 14 14 #include <algorithm> 15 15 #include <iostream> 16 #include <sstream> 16 17 17 18 #include "gfanlib_z.h" … … 84 85 unsigned int size()const{return v.size();}; 85 86 void resize(int n){v.resize(n,typ());}; 86 void grow(int i){if( size()<i)resize(i);}87 void grow(int i){if((int)size()<i)resize(i);} 87 88 void push_back(typ a) 88 89 { … … 289 290 return f<<")"; 290 291 } 292 293 std::string toString()const 294 { 295 std::stringstream f; 296 f<<*this; 297 return f.str(); 298 } 299 291 300 typ gcd()const 292 301 { … … 301 310 assert(!typ::isField()); 302 311 return (*this)/gcd(); 312 } 313 314 void debugPrint()const 315 { 316 std::stringstream s; 317 s<<"("; 318 for(typename std::vector<typ>::const_iterator i=this->v.begin();i!=this->v.end();i++) 319 { 320 if(i!=this->v.begin()) s<<","; 321 s<<*i; 322 } 323 s<<")"<<std::endl; 324 std::cout << s.str(); 325 return; 303 326 } 304 327 }; … … 393 416 394 417 return ret; 395 } 396 397 } 398 418 }; 419 420 }; 399 421 400 422 #endif /* LIB_ZVECTOR_H_ */ -
gfanlib/gfanlib_z.h
r88615db r1d1f93 10 10 11 11 #include <string.h> 12 #include <iostream> 12 13 #include <ostream> 13 14 … … 15 16 #if OLD 16 17 #include "gmp.h" 17 18 #if (__GNU_MP_VERSION == 4) && (__GNU_MP_VERSION_MINOR<2)19 extern void * (*__gmp_allocate_func) __GMP_PROTO ((size_t));20 extern void * (*__gmp_reallocate_func) __GMP_PROTO ((void *, size_t, size_t));21 extern void (*__gmp_free_func) __GMP_PROTO ((void *, size_t));22 23 static inline void24 mp_get_memory_functions (void *(**alloc_func) (size_t),25 void *(**realloc_func) (void *, size_t, size_t),26 void (**free_func) (void *, size_t))27 {28 if (alloc_func != NULL)29 *alloc_func = __gmp_allocate_func;30 31 if (realloc_func != NULL)32 *realloc_func = __gmp_reallocate_func;33 34 if (free_func != NULL)35 *free_func = __gmp_free_func;36 }37 #endif38 18 39 19 namespace gfan{ … … 89 69 freefunc(str,strlen(str)+1); 90 70 return f; 71 } 72 void debugPrint() const 73 { 74 void (*freefunc)(void *, size_t); 75 mp_get_memory_functions(0,0,&freefunc); 76 char *str=mpz_get_str(0,10,value); 77 std::cout << str; 78 freefunc(str,strlen(str)+1); 79 return; 91 80 } 92 81 Integer& operator+=(const Integer& a) … … 351 340 return f; 352 341 } 342 friend void debugPrint(IntegerTemplate const &a) 343 { 344 std::cout << a << std::endl; 345 return; 346 } 353 347 LimbWord signExtension(LimbWord a) 354 348 { -
gfanlib/gfanlib_zcone.cpp
r88615db r1d1f93 10 10 #include <vector> 11 11 #include <set> 12 13 14 #include "config.h" 15 12 #include <sstream> 13 14 #include <config.h> 16 15 #ifdef HAVE_CDD_SETOPER_H 17 #include "cdd/setoper.h" 18 #include "cdd/cdd.h" 19 #elif HAVE_CDDLIB_SETOPER_H 20 #include "cddlib/setoper.h" 21 #include "cddlib/cdd.h" 16 #include <cdd/setoper.h> 17 #include <cdd/cdd.h> 22 18 #else 23 #include "setoper.h" 24 #include "cdd.h" 19 #ifdef HAVE_CDDLIB_SETOPER_H 20 #include <cddlib/setoper.h> 21 #include <cddlib/cdd.h> 22 #else 23 #include <setoper.h> 24 #include <cdd.h> 25 #endif 25 26 #endif 26 27 … … 48 49 dd_RepresentationType rep=dd_Inequality; 49 50 // dd_boolean found=dd_FALSE, newformat=dd_FALSE, successful=dd_FALSE; 50 //char command[dd_linelenmax], comsave[dd_linelenmax];51 char command[dd_linelenmax], comsave[dd_linelenmax]; 51 52 dd_NumberType NT; 52 53 … … 68 69 for (j = 1; j < d_input; j++) { 69 70 g[i][j-1].setGmp(mpq_numref(M->matrix[i][j])); 70 mpz_ init_set_ui(mpq_denref(M->matrix[i][j]), 1);71 mpz_set_ui(mpq_denref(M->matrix[i][j]), 1); 71 72 mpq_canonicalize(M->matrix[i][j]); 72 73 } … … 111 112 { 112 113 bool ret; 113 dd_MatrixPtr M=NULL/*,M2=NULL,M3=NULL*/; 114 // dd_MatrixPtr M=NULL,M2=NULL,M3=NULL; 115 dd_MatrixPtr M=NULL; 114 116 // dd_colrange d; 115 117 dd_ErrorType err=dd_NoError; … … 117 119 // dd_colset ignoredcols, basiscols; 118 120 // dd_DataFileType inputfile; 119 //FILE *reading=NULL;121 FILE *reading=NULL; 120 122 121 123 cddinitGmp(); … … 336 338 { 337 339 cddinitGmp(); 340 338 341 int numberOfEqualities=equations.getHeight(); 339 342 int numberOfInequalities=inequalities.getHeight(); … … 451 454 void dual(ZMatrix const &inequalities, ZMatrix const &equations, ZMatrix &dualInequalities, ZMatrix &dualEquations) 452 455 { 453 //int result;456 int result; 454 457 455 458 dd_MatrixPtr A=NULL; 456 459 dd_ErrorType err=dd_NoError; 457 460 458 461 cddinitGmp(); 459 462 460 463 A=ZMatrix2MatrixGmp(inequalities, equations, &err); … … 475 478 476 479 return; 477 //_L99:478 //assert(0);480 _L99: 481 assert(0); 479 482 } 480 483 // this procedure is take from cddio.c. … … 606 609 607 610 return ret; 608 //_L99:609 //assert(0);610 //return std::vector<std::vector<int> >();611 _L99: 612 assert(0); 613 return std::vector<std::vector<int> >(); 611 614 } 612 615 … … 702 705 QMatrix m=ZToQMatrix(equations); 703 706 m.reduce(); 704 m.REformToRREform( true);707 m.REformToRREform(); 705 708 ZMatrix inequalities2(0,equations.getWidth()); 706 709 for(int i=0;i<inequalities.getHeight();i++) … … 710 713 inequalities=LpSolver::fastNormals(inequalities2); 711 714 goto noFallBack; 712 //fallBack://alternativ (disabled)713 //lpSolver.removeRedundantRows(inequalities,equations,true);715 fallBack://alternativ (disabled) 716 lpSolver.removeRedundantRows(inequalities,equations,true); 714 717 noFallBack:; 715 718 } … … 721 724 QMatrix equations2=ZToQMatrix(equations); 722 725 equations2.reduce(false,false,true); 723 equations2.REformToRREform( );726 equations2.REformToRREform(true); 724 727 for(int i=0;i<inequalities.getHeight();i++) 725 728 { … … 733 736 } 734 737 735 voidoperator<<(std::ostream &f, ZCone const &c)738 std::ostream &operator<<(std::ostream &f, ZCone const &c) 736 739 { 737 740 f<<"Ambient dimension:"<<c.n<<std::endl; … … 740 743 f<<"Equations:"<<std::endl; 741 744 f<<c.equations<<std::endl; 742 } 743 745 return f; 746 } 747 748 std::string ZCone::toString()const 749 { 750 std::stringstream f; 751 f<<*this; 752 return f.str(); 753 // ======= 754 // std::stringstream s; 755 // s<<"AMBIENT_DIM"<<std::endl; 756 // s<<this->ambientDimension()<<std::endl; 757 758 // gfan::ZMatrix i=this->getInequalities(); 759 // if (this->areFacetsKnown()) 760 // s<<"FACETS"<<std::endl; 761 // else 762 // s<<"INEQUALITIES"<<std::endl; 763 // s<<i<<std::endl; 764 765 // gfan::ZMatrix e=this->getEquations(); 766 // if (this->areImpliedEquationsKnown()) 767 // s<<"LINEAR_SPAN"<<std::endl; 768 // else 769 // s<<"EQUATIONS"<<std::endl; 770 // s<<e<<std::endl; 771 772 // gfan::ZMatrix r=this->extremeRays(); 773 // s<<"RAYS"<<std::endl; 774 // s<<r<<std::endl; 775 776 // gfan::ZMatrix l=this->generatorsOfLinealitySpace(); 777 // s<<"LINEALITY_SPACE"<<std::endl; 778 // s<<l<<std::endl; 779 780 // std::cout << s.str(); 781 // return; 782 // >>>>>>> chg: status update 17.07. 783 } 744 784 745 785 ZCone::ZCone(int ambientDimension): … … 934 974 ZCone ZCone::givenByRays(ZMatrix const &generators, ZMatrix const &linealitySpace) 935 975 { 936 ZCone dual(generators,linealitySpace); 976 //rewrite modulo lineality space 977 /* ZMatrix newGenerators(generators.getHeight(),generators.getWidth()); 978 { 979 QMatrix l=ZToQMatrix(linealitySpace); 980 l.reduce(); 981 for(int i=0;i<generators.getHeight();i++) 982 newGenerators[i]=QToZVectorPrimitive(l.canonicalize(ZToQVector(generators[i]))); 983 } 984 */ 985 // ZCone dual(newGenerators,linealitySpace); 986 ZCone dual(generators,linealitySpace); 987 // dual.findFacets(); 988 // dual.canonicalize(); 937 989 ZMatrix inequalities=dual.extremeRays(); 990 991 /* ZMatrix span=generators; 992 span.append(linealitySpace); 993 QMatrix m2Q=ZToQMatrix(span); 994 ZMatrix equations=QToZMatrixPrimitive(m2Q.reduceAndComputeKernel()); 995 */ 938 996 ZMatrix equations=dual.generatorsOfLinealitySpace(); 939 940 return ZCone(inequalities,equations,3); 997 // equations.reduce();equations.removeZeroRows(); 998 999 1000 return ZCone(inequalities,equations,PCP_impliedEquationsKnown|PCP_facetsKnown); 941 1001 } 942 1002 … … 1223 1283 { 1224 1284 if(!contains(f.getRelativeInteriorPoint()))return false; 1225 ZCone temp1=faceContaining(f.getRelativeInteriorPoint()); 1226 temp1.canonicalize(); 1285 ZCone temp=faceContaining(f.getRelativeInteriorPoint()); 1286 temp.canonicalize(); 1287 // ZCone temp2=*this; 1227 1288 ZCone temp2=f; 1228 1289 temp2.canonicalize(); 1229 return !(temp2!=temp1); 1290 // std::cout << temp << std::endl; 1291 // std::cout << temp2 << std::endl; 1292 1293 return !(temp2!=temp); 1230 1294 } 1231 1295 -
gfanlib/gfanlib_zcone.h
r88615db r1d1f93 10 10 11 11 #include "gfanlib_matrix.h" 12 #include <sstream> 12 13 13 14 namespace gfan{ … … 148 149 ZMatrix generatorsOfSpan()const; 149 150 /** 150 * Compute generators of the lineality space of the cone. The y are stored as rows of the returned matrix.151 * Compute generators of the lineality space of the cone. The returned set of generators is a vector spaces basis. They are stored as rows of the returned matrix. 151 152 */ 152 153 ZMatrix generatorsOfLinealitySpace()const; … … 163 164 */ 164 165 bool areExtremeRaysKnown()const{return haveExtremeRaysBeenCached;} 166 165 167 /** 166 168 * Takes the cone to a canonical form. After taking cones to canonical form, two cones are the same … … 342 344 */ 343 345 bool hasFace(ZCone const &f)const; 344 /**345 Computes the face of the cone containing v in its relative interior.346 The vector MUST be contained in the cone.347 */346 /** 347 Computes the face of the cone containing v in its relative interior. 348 The vector MUST be contained in the cone. 349 */ 348 350 ZCone faceContaining(ZVector const &v)const; 349 351 /** … … 351 353 * The ambient space of the returned cone has dimension newn. 352 354 */ 353 // PolyhedralCone projection(int newn)const; 354 friend void operator<<(std::ostream &f, ZCone const &c); 355 // PolyhedralCone projection(int newn)const; 356 friend std::ostream &operator<<(std::ostream &f, ZCone const &c); 357 std::string toString()const; 355 358 }; 356 359 … … 358 361 359 362 360 361 362 363 #endif /* LIB_CONE_H_ */ -
gfanlib/gfanlib_zfan.cpp
r88615db r1d1f93 37 37 { 38 38 IntVector indices=getConeIndices(dimension,index,orbit,maximal); 39 return this->complex->makeZCone(indices); 39 ZCone ret=this->complex->makeZCone(indices); 40 if(maximal)ret.setMultiplicity(((orbit)?multiplicitiesOrbits:multiplicities)[dimension][index]); 41 return ret; 40 42 } 41 43 IntVector ZFan::getConeIndices(int dimension, int index, bool orbit, bool maximal)const … … 59 61 complex = new SymmetricComplex(coneCollection->toSymmetricComplex()); 60 62 complex->buildConeLists(false,false,&cones); 61 complex->buildConeLists(true,false,&maximalCones );63 complex->buildConeLists(true,false,&maximalCones,&multiplicities); 62 64 complex->buildConeLists(false,true,&coneOrbits); 63 complex->buildConeLists(true,true,&maximalConeOrbits );65 complex->buildConeLists(true,true,&maximalConeOrbits,&multiplicitiesOrbits); 64 66 } 65 67 } … … 316 318 return complex->isPure(); 317 319 } 318 bool ZFan::isComplete()const319 {320 ensureConeCollection();321 if(coneCollection->isEmpty())322 return 0;323 int ambientdim=coneCollection->getAmbientDimension();324 int linealitydim=coneCollection->dimensionOfLinealitySpace();325 return (ambientdim==linealitydim);326 }327 320 void ZFan::insert(ZCone const &c) 328 321 { … … 363 356 } 364 357 365 std::string ZFan::toStringJustRaysAndMaximalCones(int flags)const366 {367 ensureComplex();368 return complex->toStringJustRaysAndMaximalCones(flags);369 }370 371 358 /*int ZFan::getAmbientDimension()const 372 359 { -
gfanlib/gfanlib_zfan.h
r88615db r1d1f93 42 42 mutable std::vector<std::vector<IntVector > > cones; 43 43 mutable std::vector<std::vector<IntVector > > maximalCones; 44 mutable std::vector<std::vector<Integer> > multiplicities; // for maximal cones only 44 45 mutable std::vector<std::vector<IntVector > > coneOrbits; 45 46 mutable std::vector<std::vector<IntVector > > maximalConeOrbits; 47 mutable std::vector<std::vector<Integer> > multiplicitiesOrbits; // for maximal cones orbits only 46 48 47 49 … … 105 107 */ 106 108 std::string toString(int flags=0)const; 107 std::string toStringJustRaysAndMaximalCones(int flags=0)const;108 109 /** 109 110 * Returns the dimension of the ambient space. 110 111 */ 111 112 int getAmbientDimension()const; 113 /** 114 * Returns the largest dimension of a cone in the fan. If the fan is empty, then -1 is returned. 115 */ 116 int getDimension()const; 117 /** 118 * Returns the smallest codimension of a cone in the fan. If the fan is empty, then -1 is returned. 119 */ 112 120 int getCodimension()const; 113 int getDimension()const; 121 /** 122 * Returns the dimension of the lineality space of the fan. Notice that the lineality space of the 123 * empty fan is the ambient space. 124 */ 114 125 int getLinealityDimension()const; 126 /** 127 * Returns the f-Vector of the fan. 128 */ 115 129 ZVector getFVector()const; 130 /** 131 * Returns true, if the fan is simplicial. False otherwise. 132 */ 116 133 bool isSimplicial()const; 134 /** 135 * Returns true, if the fan is pure. False otherwise. 136 */ 117 137 bool isPure()const; 118 bool isComplete()const;119 138 /** 120 139 * Inserts c into the fan. … … 137 156 int numberOfConesInCollection()const; 138 157 /** 139 * Returns the largest dimension of a cone in the fan. If the fan is empty, then -1 is returned.140 */141 int dimension()const;142 /**143 * Returns the dimension of the lineality space of the fan. Notice that the lineality space of the144 * empty fan is the ambient space.145 */146 // int getLinealityDimension();147 /**148 158 * Returns the cone in the collection given by the index. It is a mistake to specify an index which 149 159 * is out of range. 150 160 */ 151 ZCone const &getConeInCollection(int index)const;161 // ZCone const &getConeInCollection(int index)const; 152 162 /** 153 163 * Returns the cone in the cone of the fan -
kernel/GBEngine/kstd1.cc
r2f05b5 r1d1f93 2897 2897 &olddeg,&reduc,strat, red_result); 2898 2898 2899 /* reduction of the element cho osen from L */2899 /* reduction of the element chosen from L */ 2900 2900 red_result = strat->red(&strat->P,strat); 2901 2901 } -
kernel/GBEngine/kstd2.cc
r2f05b5 r1d1f93 1473 1473 &olddeg,&reduc,strat, red_result); 1474 1474 1475 /* reduction of the element cho osen from L */1475 /* reduction of the element chosen from L */ 1476 1476 red_result = strat->red(&strat->P,strat); 1477 1477 if (errorreported) break; … … 1836 1836 strat->P = strat->L[strat->Ll]; 1837 1837 strat->Ll--; 1838 /* reduction of the element cho osen from L */1838 /* reduction of the element chosen from L */ 1839 1839 1840 1840 if (!strat->rewCrit2(strat->P.sig, ~strat->P.sevSig, strat->P.GetLmCurrRing(), strat, strat->P.checked+1)) { … … 2677 2677 pWrite(strat->P.p); 2678 2678 #endif 2679 /* complete reduction of the element cho osen from L */2679 /* complete reduction of the element chosen from L */ 2680 2680 red_result = strat->red2(&strat->P,strat); 2681 2681 if (errorreported) break; … … 3012 3012 &olddeg,&reduc,strat, red_result); 3013 3013 3014 /* reduction of the element cho osen from L */3014 /* reduction of the element chosen from L */ 3015 3015 red_result = strat->red(&strat->P,strat); 3016 3016 } -
kernel/GBEngine/kstdfac.cc
r2f05b5 r1d1f93 589 589 message(currRing->pFDeg(strat->P.p,currRing),&olddeg,&reduc,strat, red_result); 590 590 } 591 /* reduction of the element cho osen from L */591 /* reduction of the element chosen from L */ 592 592 kTest_TS(strat); 593 593 red_result = strat->red(&strat->P,strat); -
kernel/GBEngine/sca.cc
r2f05b5 r1d1f93 615 615 &olddeg,&reduc,strat, red_result); 616 616 617 // reduction of the element cho osen from L617 // reduction of the element chosen from L 618 618 red_result = strat->red(&strat->P,strat); 619 619 … … 743 743 h.PrepareRed(strat->use_buckets); 744 744 745 // reduction of the element cho osen from L(?)745 // reduction of the element chosen from L(?) 746 746 red_result = strat->red(&h,strat); 747 747 -
kernel/fast_mult.cc
r2f05b5 r1d1f93 592 592 Werror("not implemented for so small n, recursion fails");//should be length(f) 593 593 if (pLength(f)<=1) 594 Werror("not implemented for so small leng htof f, recursion fails");594 Werror("not implemented for so small length of f, recursion fails"); 595 595 // number null_number=n_Init(0,r); 596 596 number* facult=(number*) omAlloc((n+1)*sizeof(number)); -
kernel/groebner_walk/walkProc.cc
r2f05b5 r1d1f93 118 118 if ( pperm[k] >= 0 ) 119 119 { 120 WerrorS( "param ater names do not agree" );120 WerrorS( "parameter names do not agree" ); 121 121 state= WalkIncompatibleRings; 122 122 } -
kernel/linear_algebra/linearAlgebra.cc
r88615db r1d1f93 431 431 solution space will be. Thus, we start with the possibly too wide 432 432 matrix N and later copy the relevant columns of N into H. */ 433 int nonZeroC = 0 ; 433 int nonZeroC = 0 ; 434 434 int lastNonZeroC = n + 1; 435 435 -
kernel/numeric/mpr_base.cc
r2f05b5 r1d1f93 1458 1458 { 1459 1459 // this can happen, if the shift vektor or the lift funktions 1460 // are not generically cho osen.1460 // are not generically chosen. 1461 1461 Werror("resMatrixSparse::createMatrix: Found exponent not in E, id %d, set [%d, %d]!", 1462 1462 i,(*E)[i]->rc.set,(*E)[i]->rc.pnt); … … 2704 2704 break; 2705 2705 default: 2706 WerrorS("uResultant::uResultant: Unknown resultant matrix type choosen!");2706 WerrorS("uResultant::uResultant: Unknown chosen resultant matrix type!"); 2707 2707 } 2708 2708 } … … 2735 2735 break; 2736 2736 default: 2737 WerrorS("uResultant::extendIdeal: Unknown resultant matrix type choosen!");2737 WerrorS("uResultant::extendIdeal: Unknown chosen resultant matrix type!"); 2738 2738 } 2739 2739 -
kernel/numeric/mpr_inout.cc
r2f05b5 r1d1f93 63 63 { 64 64 case mprWrongRType: 65 WerrorS("Unknown resultant matrix type choosen!");65 WerrorS("Unknown chosen resultant matrix type!"); 66 66 break; 67 67 case mprHasOne: -
libpolys/coeffs/Enumerator.h
r2f05b5 r1d1f93 58 58 59 59 private: 60 /// disable copy constructor and assig ment operator60 /// disable copy constructor and assignment operator 61 61 IBaseEnumerator(const IBaseEnumerator&); 62 62 void operator=(const IBaseEnumerator&); … … 169 169 /** @class AIterator 170 170 * 171 * An abstract iterator with virtualized assig ment operator and171 * An abstract iterator with virtualized assignment operator and 172 172 * constructors. 173 173 * -
libpolys/coeffs/coeffs.h
r88615db r1d1f93 609 609 610 610 /// return the quotient of 'a' and 'b', i.e., a/b; 611 /// raise an error if 'b' is not invertible in r 611 /// raises an error if 'b' is not invertible in r 612 /// exception in Z: raises an error if 'a' is not divisible by 'b' 612 613 static FORCE_INLINE number n_Div(number a, number b, const coeffs r) 613 614 { STATISTIC(n_Div); assume(r != NULL); assume(r->cfDiv!=NULL); return r->cfDiv(a,b,r); } -
libpolys/coeffs/longrat.cc
r2f05b5 r1d1f93 3086 3086 { 3087 3087 /* test, if r is an instance of nInitCoeffs(n,parameter) */ 3088 /* if param ater is not needed */3088 /* if parameter is not needed */ 3089 3089 if (n==r->type) 3090 3090 { -
libpolys/coeffs/numbers.cc
r2f05b5 r1d1f93 277 277 { 278 278 /* test, if r is an instance of nInitCoeffs(n,parameter) */ 279 /* if param ater is not needed */279 /* if parameter is not needed */ 280 280 return (n==r->type); 281 281 } -
libpolys/polys/templates/p_Procs_Impl.h
r2f05b5 r1d1f93 31 31 macros. 32 32 33 At run-time, a fast proc is set/cho osen if found/generated, else34 a general proc is set/cho osen.33 At run-time, a fast proc is set/chosen if found/generated, else 34 a general proc is set/chosen. 35 35 *******************************************************************/ 36 36 … … 396 396 * 397 397 * Filters which are applied to field/length/ord, before a proc is 398 * cho osen398 * chosen 399 399 * 400 400 *******************************************************************/ -
m4/flags.m4
r88615db r1d1f93 103 103 AX_APPEND_COMPILE_FLAGS(${FFLAGS}, [FEXCEPTIONSFRTTI_CXXFLAGS]) 104 104 AC_SUBST(FEXCEPTIONSFRTTI_CXXFLAGS) 105 105 106 106 AC_LANG_POP([C++]) 107 107 -
m4/gfanlib-check.m4
r88615db r1d1f93 16 16 AC_CHECK_HEADERS([setoper.h cdd/setoper.h cddlib/setoper.h]) 17 17 18 if test "x$ac_cv_header_setoper_h" = xno -a "x$ac_cv_header_cdd_setoper_h" = xno -a "x$ac_cv_header_cddlib_setoper_h" = xno; then 19 AC_MSG_WARN([Note that setoper.h is missing!]) 18 if test "x$ac_cv_header_setoper_h" = xno -a "x$ac_cv_header_cdd_setoper_h" = xno -a "x$ac_cv_header_cddlib_setoper_h" = xno 19 then 20 AC_MSG_WARN([Error, setoper.h is missing!]) 20 21 fi 21 22 … … 66 67 fi 67 68 fi 69 AC_MSG_RESULT(no) 70 71 AC_SUBST(CDDGMPLDFLAGS) 68 72 else 69 73 AC_MSG_RESULT(no)
Note: See TracChangeset
for help on using the changeset viewer.