#include <ncSAMult.h>
|
| CGlobalMultiplier (ring r) |
|
virtual | ~CGlobalMultiplier () |
|
virtual poly | MultiplyEE (const CExponent expLeft, const CExponent expRight) |
|
virtual poly | MultiplyME (const poly pMonom, const CExponent expRight) |
|
virtual poly | MultiplyEM (const CExponent expLeft, const poly pMonom) |
|
poly | MultiplyPE (const poly pPoly, const CExponent expRight) |
|
poly | MultiplyEP (const CExponent expLeft, const poly pPoly) |
|
poly | MultiplyPEDestroy (poly pPoly, const CExponent expRight) |
|
poly | MultiplyEPDestroy (const CExponent expLeft, poly pPoly) |
|
| CMultiplier (ring rBaseRing) |
|
virtual | ~CMultiplier () |
|
ring | GetBasering () const |
|
int | NVars () const |
|
poly | LM (const poly pTerm, const ring r, int i=1) const |
|
poly | MultiplyTE (const poly pTerm, const poly expRight) |
|
poly | MultiplyET (const poly expLeft, const poly pTerm) |
|
| CMultiplier (ring rBaseRing) |
|
virtual | ~CMultiplier () |
|
ring | GetBasering () const |
|
int | NVars () const |
|
poly | LM (const poly pTerm, const ring r, int i=1) const |
|
poly | MultiplyTE (const poly pTerm, const poly expRight) |
|
poly | MultiplyET (const poly expLeft, const poly pTerm) |
|
Definition at line 263 of file ncSAMult.h.
◆ CBaseType
◆ CExponent
◆ CGlobalMultiplier()
CGlobalMultiplier::CGlobalMultiplier |
( |
ring | r | ) |
|
Definition at line 293 of file ncSAMult.cc.
293 :
295{
296#if OUTPUT
297 PrintS(
"CGlobalMultiplier::CGlobalMultiplier(ring)!");
299#endif
300
301
303}
CPowerMultiplier * m_powers
const CFormulaPowerMultiplier * m_RingFormulaMultiplier
CMultiplier(ring rBaseRing)
void PrintS(const char *s)
◆ ~CGlobalMultiplier()
CGlobalMultiplier::~CGlobalMultiplier |
( |
| ) |
|
|
virtual |
Definition at line 306 of file ncSAMult.cc.
307{
308#if OUTPUT
309 PrintS(
"CGlobalMultiplier::~CGlobalMultiplier()!");
311#endif
312
313
315
316
317}
◆ MultiplyEE()
Implements CMultiplier< poly >.
Definition at line 323 of file ncSAMult.cc.
324{
325
327
328#if OUTPUT
329 PrintS(
"CGlobalMultiplier::MultiplyEE(expLeft, expRight)!");
333#endif
334
335
336
337
338
339
340
341
342
343
344
346
350
353
354 while( (
i <
j) && !((ej != 0) && (ei != 0)) )
355 {
356 if( ei == 0 )
358
359 if( ej == 0 )
361 }
362
363
364#if OUTPUT
365 PrintS(
"<CGlobalMultiplier::MultiplyEE>");
369 Print(
"ei: %d, ej: %d", ei, ej);
371#endif
372
373
374
375
376
377
379 {
380
381
382 product =
p_Head(expRight, r);
383
384
385
386
387
389 {
391 ei = 0;
392 }
393
395 {
396 if( ej != 0 )
398 }
399
401
403 {
405
406 if( e > 0 )
408 }
409
411
412 } else
413 {
414
416
419
420
422 product =
m_powers->MultiplyEE( CPower(
j, ej), CPower(
i, ei) );
423
424 else
425
427
428
429#if OUTPUT
430 PrintS(
"<CGlobalMultiplier::MultiplyEE> ==> ");
434 Print(
"ei: %d, ej: %d", ei, ej);
437#endif
438
439
440
441
442 while( (product !=
NULL) && !((
i ==
NVars()) && (
j == 1)) )
443 {
444
445
446
448 {
450
451 while( (ei == 0) && (
i <
NVars()) )
453
454 if( ei != 0 )
455 product =
m_powers->MultiplyPEDestroy(product, CPower(
i, ei));
456 }
457
459 {
461
462 while( (ej == 0) && (1 <
j) )
464
465 if( ej != 0 )
466 product =
m_powers->MultiplyEPDestroy(CPower(
j, ej), product);
467 }
468
469
470#if OUTPUT
471 PrintS(
"<CGlobalMultiplier::MultiplyEE> ==> ");
475 Print(
"ei: %d, ej: %d", ei, ej);
478#endif
479
480 }
481
482 }
483
484
485
486
487
488 return product;
489}
const CanonicalForm CFMap CFMap & N
void p_Write(poly p, ring lmRing, ring tailRing)
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent @Note: VarOffset encodes the position in p->exp
static void p_Setm(poly p, const ring r)
static poly p_Head(const poly p, const ring r)
copy the (leading) term of p
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
◆ MultiplyEM()
Implements CMultiplier< poly >.
Definition at line 505 of file ncSAMult.cc.
506{
507#if OUTPUT
508 PrintS(
"CGlobalMultiplier::MultiplyEM(expL, monom)!");
512#endif
513
515}
virtual poly MultiplyEE(const CExponent expLeft, const CExponent expRight)
◆ MultiplyEP()
Definition at line 349 of file ncSAMult.h.
350 {
353
355 CPolynomialSummator sum(
GetBasering(), bUsePolynomial);
356
357 if( iComponentMonom!=0 )
358 {
359 for( poly q = pPoly; q !=
NULL; q =
pNext(q) )
360 {
361#ifdef PDEBUG
362 {
365 if( iComponent!=0 )
366 {
367 Werror(
"MultiplyEP: both sides have non-zero components: %d and %d!\n", iComponent, iComponentMonom);
368
370 }
371 }
372#endif
374 }
376 return t;
377 }
378 else
379 {
380 for( poly q = pPoly; q !=
NULL; q =
pNext(q) )
381 {
383
386 sum += t;
387 }
388 return sum;
389 }
390 }
poly MultiplyET(const poly expLeft, const poly pTerm)
#define TEST_OPT_NOT_BUCKETS
#define MIN_LENGTH_BUCKET
static int pLength(poly a)
static void p_SetCompP(poly p, int i, ring r)
void Werror(const char *fmt,...)
◆ MultiplyEPDestroy()
poly CGlobalMultiplier::MultiplyEPDestroy |
( |
const CExponent | expLeft, |
|
|
poly | pPoly ) |
|
inline |
Definition at line 447 of file ncSAMult.h.
448 {
449
452
454 CPolynomialSummator sum(
GetBasering(), bUsePolynomial);
455
456 if( iComponentMonom!=0 )
457 {
459 {
460#ifdef PDEBUG
461 {
464 if( iComponent!=0 )
465 {
466 Werror(
"MultiplyEPDestroy: both sides have non-zero components: %d and %d!\n", iComponent, iComponentMonom);
467
469 }
470 }
471#endif
473 }
475 return t;
476 }
477 else
478 {
480 {
482
485 sum += t;
486 }
487 return sum;
488 }
489
490 }
static poly p_LmDeleteAndNext(poly p, const ring r)
◆ MultiplyME()
◆ MultiplyPE()
Definition at line 296 of file ncSAMult.h.
297 {
300
302 CPolynomialSummator sum(
GetBasering(), bUsePolynomial);
303
304
305 if( iComponentMonom!=0 )
306 {
307 for( poly q = pPoly; q !=
NULL; q =
pNext(q) )
308 {
309#ifdef PDEBUG
310 {
313 if( iComponent!=0 )
314 {
315 Werror(
"MultiplyPE: both sides have non-zero components: %d and %d!\n", iComponent, iComponentMonom);
316
318 }
319
320 }
321#endif
323 }
325 return t;
326 }
327 else
328 {
329 for( poly q = pPoly; q !=
NULL; q =
pNext(q) )
330 {
332
333#ifdef PDEBUG
334 if( iComponent!=0 )
335 {
336 Warn(
"MultiplyPE: Multiplication in the left module from the right by component %d!\n", iComponent);
337
338 }
339#endif
342 sum += t;
343 }
344 return sum;
345 }
346 }
poly MultiplyTE(const poly pTerm, const poly expRight)
◆ MultiplyPEDestroy()
poly CGlobalMultiplier::MultiplyPEDestroy |
( |
poly | pPoly, |
|
|
const CExponent | expRight ) |
|
inline |
Definition at line 393 of file ncSAMult.h.
394 {
397
399 CPolynomialSummator sum(
GetBasering(), bUsePolynomial);
400
401
402 if( iComponentMonom!=0 )
403 {
405 {
406#ifdef PDEBUG
407 {
410 if( iComponent!=0 )
411 {
412 Werror(
"MultiplyPEDestroy: both sides have non-zero components: %d and %d!\n", iComponent, iComponentMonom);
413
415 }
416
417 }
418#endif
420 }
422 return t;
423 }
424 else
425 {
427 {
429
430#ifdef PDEBUG
431 if( iComponent!=0 )
432 {
433 Warn(
"MultiplyPEDestroy: Multiplication in the left module from the right by component %d!\n", iComponent);
434
435 }
436#endif
439 sum += t;
440 }
441 return sum;
442 }
443
444 }
◆ m_powers
◆ m_RingFormulaMultiplier
The documentation for this class was generated from the following files: