Changeset deedf3 in git
- Timestamp:
- Nov 18, 2022, 5:53:30 PM (17 months ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 63d2db479e6d60dfeed92ab8261e782b65a9b9ad
- Parents:
- 0661780885c7599c6bf16f79e89ec0b5eb70cb5e
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2022-11-18 17:53:30+01:00
- git-committer:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2022-11-18 17:56:22+01:00
- Location:
- kernel/GBEngine
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kutil.cc
r0661780 rdeedf3 6124 6124 } 6125 6125 return ind; 6126 }6127 6128 int posInLrg0 (const LSet set, const int length,6129 LObject* p,const kStrategy)6130 /* if (nGreater(pGetCoeff(p), pGetCoeff(set[an]))) return en;6131 if (pLmCmp(set[i],p) == cmp_int) en = i;6132 else if (pLmCmp(set[i],p) == -cmp_int) an = i;6133 else6134 {6135 if (nGreater(pGetCoeff(p), pGetCoeff(set[i]))) an = i;6136 else en = i;6137 }*/6138 {6139 if (length < 0) return 0;6140 6141 int o = p->GetpFDeg();6142 int op = set[length].GetpFDeg();6143 6144 if ((op > o) || ((op == o) && (pLmCmp(set[length].p,p->p) != -currRing->OrdSgn)))6145 return length + 1;6146 int i;6147 int an = 0;6148 int en = length;6149 loop6150 {6151 if (an >= en - 1)6152 {6153 op = set[an].GetpFDeg();6154 if ((op > o) || ((op == o) && (pLmCmp(set[an].p,p->p) != -currRing->OrdSgn)))6155 return en;6156 return an;6157 }6158 i = (an+en) / 2;6159 op = set[i].GetpFDeg();6160 if ((op > o) || ((op == o) && (pLmCmp(set[i].p,p->p) != -currRing->OrdSgn)))6161 an = i;6162 else6163 en = i;6164 }6165 6126 } 6166 6127 … … 11732 11693 #endif 11733 11694 else if (strat->posInL==posInLSpecial) printf("posInLSpecial\n"); 11734 else if (strat->posInL==posInLrg0) printf("posInLrg0\n");11735 11695 else printf("%p\n",(void*)strat->posInL); 11736 11696 printf("enterS: "); … … 11814 11774 } 11815 11775 11816 #ifdef HAVE_SHIFTBBA11817 poly pCopyL2p(LObject H, kStrategy strat)11818 {11819 /* restores a poly in currRing from LObject */11820 LObject h = H;11821 h.Copy();11822 poly p;11823 if (h.p == NULL)11824 {11825 if (h.t_p != NULL)11826 {11827 p = prMoveR(h.t_p, /* source ring: */ strat->tailRing, /* dest. ring: */ currRing);11828 return(p);11829 }11830 else11831 {11832 /* h.tp == NULL -> the object is NULL */11833 return(NULL);11834 }11835 }11836 /* we're here if h.p != NULL */11837 if (h.t_p == NULL)11838 {11839 /* then h.p is the whole poly in currRing */11840 p = h.p;11841 return(p);11842 }11843 /* we're here if h.p != NULL and h.t_p != NULL */11844 // clean h.p, get poly from t_p11845 pNext(h.p)=NULL;11846 pLmDelete(&h.p);11847 p = prMoveR(h.t_p, /* source ring: */ strat->tailRing,11848 /* dest. ring: */ currRing);11849 // no need to clean h: we re-used the polys11850 return(p);11851 }11852 #endif11853 11854 11776 //LObject pCopyp2L(poly p, kStrategy strat) 11855 11777 //{ … … 11858 11780 11859 11781 //} 11860 11861 // poly pCopyL2p(LObject H, kStrategy strat)11862 // {11863 // /* restores a poly in currRing from LObject */11864 // LObject h = H;11865 // h.Copy();11866 // poly p;11867 // if (h.p == NULL)11868 // {11869 // if (h.t_p != NULL)11870 // {11871 // p = p_ShallowCopyDelete(h.t_p, (strat->tailRing != NULL ? strat->tailRing : currRing), strat->tailBin);11872 // return(p);11873 // }11874 // else11875 // {11876 // /* h.tp == NULL -> the object is NULL */11877 // return(NULL);11878 // }11879 // }11880 // /* we're here if h.p != NULL */11881 11882 // if (h.t_p == NULL)11883 // {11884 // /* then h.p is the whole poly in tailRing */11885 // if (strat->tailBin != NULL && (pNext(h.p) != NULL))11886 // {11887 // p = p_ShallowCopyDelete(h.p, (strat->tailRing != NULL ? strat->tailRing : currRing), strat->tailBin);11888 // }11889 // return(p);11890 // }11891 // /* we're here if h.p != NULL and h.t_p != NULL */11892 // p = pCopy(pHead(h.p)); // in currRing11893 // if (strat->tailBin != NULL && (pNext(h.p) != NULL))11894 // {11895 // // pNext(p) = p_ShallowCopyDelete(pNext(h.t_p), (strat->tailRing != NULL ? strat->tailRing : currRing), strat->tailBin);11896 // poly pp = p_Copy(pNext(h.p), strat->tailRing);11897 // // poly p3 = p_Copy(pNext(h.p), currRing); // error11898 // // p_ShallowCopyDelete(pNext(h.p), currRing, strat->tailBin); // the same as pp11899 // poly p5 = p_ShallowCopyDelete(pNext(h.p), strat->tailRing, strat->tailBin);11900 // pNext(p) = p_ShallowCopyDelete(h.t_p, strat->tailRing, strat->tailBin);11901 // poly p4 = p_Copy(h.t_p, strat->tailRing);11902 // // if (p.t_p != NULL) pNext(p.t_p) = pNext(p.p);11903 // }11904 // // pTest(p);11905 // return(p);11906 // }11907 11782 11908 11783 /*2 -
kernel/GBEngine/kutil.h
r0661780 rdeedf3 858 858 } 859 859 860 poly pCopyL2p(LObject h, kStrategy strat);861 862 860 void enterTShift(LObject p, kStrategy strat, int atT = -1); 863 861
Note: See TracChangeset
for help on using the changeset viewer.