CoCoALib-0.9905 date: 23 May 2007


CoCoA::geobucket::bucket Class Reference

used only in geobuckets More...

#include <geobucket.H>

Collaboration diagram for CoCoA::geobucket::bucket:

Collaboration graph
[legend]
List of all members.

Dirty functions for efficiency

static bool myIsZeroAddLCs (const SparsePolyRing &, bucket &b1, bucket &b2)
 b1 += LM(b2); b2 -= LM(b2); return LC(b1)+LC(b2)==0
void MoveLM (bucket &b1, bucket &b2)
 b1 += LM(b2); b2 -= LM(b2)
void MoveLM (const SparsePolyRing &, bucket &b1, bucket &b2)
 b1 += LM(b2); b2 -= LM(b2)

Public Member Functions

 bucket (const SparsePolyRing &, std::size_t MaxLen)
 bucket (const bucket &)
 copy constructor to use C++ vectors of buckets
 ~bucket ()

Private Member Functions

void myNormalize ()
 myPoly *= myCoeff; myCoeff = 1
void myAddClear (RefRingElem f, std::size_t FLen)
 *this += f; f = 0
void myAddClear (bucket &b)
 *this += b; b = 0
void myMulByCoeff (ConstRefRingElem coeff)
 *this *= coeff
void myDivByCoeff (ConstRefRingElem coeff)
 *this /= coeff

Private Attributes

data members of geobucket::bucket
RingElem myCoeff
 the coefficient factor
RingElem myPoly
 the polynomial (a "clean" RingElem)
std::size_t myMaxLen
 the maximal length allowed for the polynomial of this bucket
std::size_t myApproxLen
 an upper bound for the current length of the polynomial of this bucket

Friends

class geobucket
bool IsZero (const bucket &b)
RingElem content (const bucket &b)
ConstRefRingElem poly (bucket &b)
 it normalizes the bucket and returns a reference to the polynomial
Friends functions on geobuckets
ConstRefPPMonoidElem LPP (const geobucket &gbk)
void AddClear (RefRingElem f, geobucket &gbk)
void ReductionStep (geobucket &gbk, ConstRefRingElem f, std::size_t RedLen)
void MoveLM (RefRingElem f, geobucket &gbk)
std::ostream & operator<< (std::ostream &out, const geobucket &g)
void PrintLengths (std::ostream &out, const geobucket &g)

Detailed Description

used only in geobuckets

A bucket represents a polynomial as a product of a polynomial and a coefficient.

The coeffient factor is used for fast multiplication of a geobucket by a coefficient and it comes useful in the reduction process over a field of fraction of a GCD ring.

We normalize the bucket only when it is necessary: e.g. to compute a reference to the LC of the bucket.

All methods are private (to be used only by geobuckets)

\*-----------------------------------------------------------------

Definition at line 76 of file geobucket.H.


Constructor & Destructor Documentation

CoCoA::geobucket::bucket::bucket const SparsePolyRing ,
std::size_t  MaxLen
 

CoCoA::geobucket::bucket::bucket const bucket  ) 
 

copy constructor to use C++ vectors of buckets

CoCoA::geobucket::bucket::~bucket  ) 
 


Member Function Documentation

void CoCoA::geobucket::bucket::myNormalize  )  [private]
 

myPoly *= myCoeff; myCoeff = 1

  • weak exception guarantee

void CoCoA::geobucket::bucket::myAddClear RefRingElem  f,
std::size_t  FLen
[private]
 

*this += f; f = 0

  • *this will be normalized
  • weak exception guarantee

void CoCoA::geobucket::bucket::myAddClear bucket b  )  [private]
 

*this += b; b = 0

  • *this will be normalized
  • weak exception guarantee

void CoCoA::geobucket::bucket::myMulByCoeff ConstRefRingElem  coeff  )  [private]
 

*this *= coeff

  • weak exception guarantee

void CoCoA::geobucket::bucket::myDivByCoeff ConstRefRingElem  coeff  )  [private]
 

*this /= coeff

  • assumes *this is divisible by coeff
  • weak exception guarantee

static bool CoCoA::geobucket::bucket::myIsZeroAddLCs const SparsePolyRing ,
bucket b1,
bucket b2
[static, private]
 

b1 += LM(b2); b2 -= LM(b2); return LC(b1)+LC(b2)==0

  • it assumes LPP(b1) == LPP(b2)
  • b1 and b2 will be normalized


Friends And Related Function Documentation

friend class geobucket [friend]
 

Definition at line 78 of file geobucket.H.

bool IsZero const bucket b  )  [friend]
 

Definition at line 196 of file geobucket.H.

RingElem content const bucket b  )  [friend]
 

ConstRefRingElem poly bucket b  )  [friend]
 

it normalizes the bucket and returns a reference to the polynomial

void MoveLM bucket b1,
bucket b2
[friend]
 

b1 += LM(b2); b2 -= LM(b2)

void MoveLM const SparsePolyRing ,
bucket b1,
bucket b2
[friend]
 

b1 += LM(b2); b2 -= LM(b2)

  • it assumes LPP(b1)<LPP(b2)
  • b1 and b2 will be normalized

ConstRefPPMonoidElem LPP const geobucket gbk  )  [friend]
 

Definition at line 202 of file geobucket.H.

void AddClear RefRingElem  f,
geobucket gbk
[friend]
 

void ReductionStep geobucket gbk,
ConstRefRingElem  f,
std::size_t  RedLen
[friend]
 

void MoveLM RefRingElem  f,
geobucket gbk
[friend]
 

std::ostream& operator<< std::ostream &  out,
const geobucket g
[friend]
 

void PrintLengths std::ostream &  out,
const geobucket g
[friend]
 


Member Data Documentation

RingElem CoCoA::geobucket::bucket::myCoeff [private]
 

the coefficient factor

Definition at line 131 of file geobucket.H.

RingElem CoCoA::geobucket::bucket::myPoly [private]
 

the polynomial (a "clean" RingElem)

Definition at line 132 of file geobucket.H.

Referenced by CoCoA::IsZero().

std::size_t CoCoA::geobucket::bucket::myMaxLen [private]
 

the maximal length allowed for the polynomial of this bucket

Definition at line 133 of file geobucket.H.

std::size_t CoCoA::geobucket::bucket::myApproxLen [private]
 

an upper bound for the current length of the polynomial of this bucket

Definition at line 134 of file geobucket.H.


The documentation for this class was generated from the following file:
Generated on Wed May 23 13:44:27 2007 for CoCoALib by  doxygen 1.4.6