Changeset 80ca3c in git for libpolys/polys/nc
- Timestamp:
- Feb 22, 2012, 9:32:50 PM (12 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- 64f0ca8d7049bea31d0e107cf5c613e0b6ffa5d3
- Parents:
- 1adae39f1ae788b310c426226af46794834f1fac
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-02-22 21:32:50+01:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-02-23 20:35:08+01:00
- Location:
- libpolys/polys/nc
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/nc/nc.h
r1adae39 r80ca3c 2 2 #define POLYS_NC_H 3 3 4 #include <polys/monomials/ring.h> 5 #include <polys/kbuckets.h> 4 6 5 7 #ifdef HAVE_PLURAL 6 7 8 8 9 9 // TODO: the following is a part of ring.h... would be nice to have a 10 10 // clear public NC interface defined here! 11 12 #include <polys/monomials/ring.h>13 #include <polys/kbuckets.h>14 11 15 12 … … 75 72 SPoly_Proc_Ptr SPoly; 76 73 SPolyReduce_Proc_Ptr ReduceSPoly; 74 75 void* GB; ///< From "gb_hack.h" 76 // GlobalGB, // BBA 77 // LocalGB; // MORA 77 78 }; 78 79 … … 312 313 } 313 314 314 315 315 /* subst: */ 316 316 poly nc_pSubst(poly p, int n, poly e, const ring r); 317 318 // set pProcs table for rGR and global variable p_Procs319 // this should be used by p_ProcsSet in p_Procs_Set.h320 void nc_p_ProcsSet(ring rGR, p_Procs_s* p_Procs);321 322 317 323 318 // the part, related to the interface … … 332 327 333 328 334 BOOLEAN nc_rComplete(const ring src, ring dest, bool bSetupQuotient = true); // in ring.cc335 336 329 // this function should be used inside QRing definition! 337 330 // we go from rG into factor ring rGR with factor ideal rGR->qideal. 338 331 bool nc_SetupQuotient(ring rGR, const ring rG = NULL, bool bCopy = false); // rG == NULL means that there is no base G-algebra 339 332 333 BOOLEAN nc_rComplete(const ring src, ring dest, bool bSetupQuotient = true); // in ring.cc 340 334 341 335 bool nc_rCopy(ring res, const ring r, bool bSetupQuotient); … … 372 366 373 367 #ifdef PLURAL_INTERNAL_DECLARATIONS 368 369 // set pProcs table for rGR and global variable p_Procs 370 // this should be used by p_ProcsSet in p_Procs_Set.h 371 void nc_p_ProcsSet(ring rGR, p_Procs_s* p_Procs); 372 374 373 375 374 #include <polys/matpol.h> … … 398 397 } 399 398 400 #endif / * PLURAL_INTERNAL_DECLARATIONS */399 #endif // PLURAL_INTERNAL_DECLARATIONS 401 400 402 401 #endif /* HAVE_PLURAL */ -
libpolys/polys/nc/old.gring.cc
r1adae39 r80ca3c 26 26 #include "nc/nc.h" 27 27 #include "nc/sca.h" 28 28 #include "nc/gb_hack.h" 29 30 #include "monomials/ring.h" 31 29 32 #include <coeffs/numbers.h> 30 33 #include "coeffrings.h" … … 121 124 poly gnc_mm_Mult_pp(const poly m, const poly p, const ring r); 122 125 123 124 // set pProcs for r and global variable p_Procs as for general non-commutative algebras.125 void gnc_p_ProcsSet(ring rGR, p_Procs_s* p_Procs);126 126 127 127 /* syzygies : */ … … 2748 2748 2749 2749 2750 2750 2751 BOOLEAN gnc_InitMultiplication(ring r, bool bSetupQuotient = false); // just for a moment 2751 2752 2753 2752 2754 2753 /// returns TRUE if there were errors … … 3064 3063 // Setup new NC structure!!! 3065 3064 if (r->GetNC() != NULL) 3065 { 3066 #ifndef NDEBUG 3067 WarnS("Changing the NC-structure of an existing NC-ring!!!"); 3068 #endif 3066 3069 nc_rKill(r); 3070 } 3067 3071 3068 3072 r->GetNC() = nc_new; … … 3171 3175 } 3172 3176 r->GetNC()->COM=COM; 3177 3173 3178 3174 3179 nc_p_ProcsSet(r, r->p_Procs); 3175 3180 3176 3181 if(bSetupQuotient) // Test me!!! 3177 { 3178 nc_SetupQuotient(r); 3179 } 3180 3181 3182 // ??? 3183 if( bNoPluralMultiplication ) 3184 ncInitSpecialPairMultiplication(r); 3185 3186 3187 if(!rIsSCA(r) && !bNoFormula) 3188 ncInitSpecialPowersMultiplication(r); 3189 3190 3182 nc_SetupQuotient(r, NULL, false); // no copy! 3183 3184 3191 3185 // if (save != currRing) 3192 3186 // rChangeCurrRing(save); … … 3195 3189 } 3196 3190 3191 3192 // set pProcs for r and global variable p_Procs as for general non-commutative algebras. 3193 static inline 3197 3194 void gnc_p_ProcsSet(ring rGR, p_Procs_s* p_Procs) 3198 3195 { … … 3225 3222 #endif 3226 3223 3227 3224 // warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object? 3225 if (rHasLocalOrMixedOrdering(rGR)) 3226 rGR->GetNC()->p_Procs.GB = cast_A_to_vptr(gnc_gr_mora); 3227 else 3228 rGR->GetNC()->p_Procs.GB = cast_A_to_vptr(gnc_gr_bba); 3229 3230 /////////// rGR->GetNC()->p_Procs.GB = gnc_gr_bba; // bba even for local case! 3231 // old /// r->GetNC()->GB() = gnc_gr_bba; 3232 // rGR->GetNC()->p_Procs.GlobalGB = gnc_gr_bba; 3233 // rGR->GetNC()->p_Procs.LocalGB = gnc_gr_mora; 3234 // const ring save = currRing; if( save != r ) rChangeCurrRing(r); 3235 // ideal res = gnc_gr_bba(F, Q, w, hilb, strat/*, r*/); 3236 // if( save != r ) rChangeCurrRing(save); return (res); 3228 3237 3229 3238 … … 3261 3270 sca_p_ProcsSet(rGR, p_Procs); 3262 3271 } 3263 } 3264 3272 3273 if( bNoPluralMultiplication ) 3274 ncInitSpecialPairMultiplication(rGR); 3275 3276 if(!rIsSCA(rGR) && !bNoFormula) 3277 ncInitSpecialPowersMultiplication(rGR); 3278 3279 } 3265 3280 3266 3281 -
libpolys/polys/nc/old.gring.h
r1adae39 r80ca3c 121 121 } 122 122 123 inline ideal nc_GB(const ideal F, const ideal Q, const intvec *w, const intvec *hilb, kStrategy strat)124 {125 assume(rIsPluralRing(currRing));126 127 assume(currRing->GetNC()->p_Procs.GB!=NULL);128 return currRing->GetNC()->p_Procs.GB(F, Q, w, hilb, strat);129 130 /*131 if (rHasLocalOrMixedOrder(currRing))132 {133 assume(currRing->GetNC()->p_Procs.LocalGB!=NULL);134 return currRing->GetNC()->p_Procs.LocalGB(F, Q, w, hilb, strat);135 } else136 {137 assume(currRing->GetNC()->p_Procs.GlobalGB!=NULL);138 return currRing->GetNC()->p_Procs.GlobalGB(F, Q, w, hilb, strat);139 }140 */141 }142 143 144 145 146 123 #endif //
Note: See TracChangeset
for help on using the changeset viewer.