GiNaCRA  0.6.4
GiNaCRA::MultivariatePolynomialMR Class Reference

A class for a multivariate polynomial providing a degree-based representation. More...

#include <MultivariatePolynomialMR.h>

Collaboration diagram for GiNaCRA::MultivariatePolynomialMR:

Public Member Functions

 MultivariatePolynomialMR ()
 MultivariatePolynomialMR (const MonomMRCompare &comp)
 MultivariatePolynomialMR (const MultivariateTermMR &t1, const MonomMRCompare &comp)
 MultivariatePolynomialMR (const MultivariateTermMR &t1, const MultivariateTermMR &t2, const MonomMRCompare &comp)
 MultivariatePolynomialMR (sMT_It begin, sMT_It last, const MonomMRCompare &comp)
 MultivariatePolynomialMR (const GiNaC::ex &expr, const MonomMRCompare &cmp)
 Constructs a multivariate polynomial with standard variables using graded degree lexicographic monomial ordering.
 MultivariatePolynomialMR (const sMT_It begin1, const sMT_It last1, const sMT_It begin2, const sMT_It last2, const MonomMRCompare &comp)
 Creates an object with the sum of the given terms.
MonomOrderingFc getMonomOrderFunction () const
MonomMRCompare getMonomOrder () const
bool isZero () const
 Checks whether there are any terms.
bool isConstant () const
MultivariateMonomialMR lmon () const
MultivariateTermMR lterm () const
GiNaC::ex lcoeff () const
unsigned nrOfTerms () const
const MultivariatePolynomialMR truncLT () const
GiNaC::ex toEx () const
 GiNaC expression representing the same multivariate polynomial.
MultivariatePolynomialMR CalculateRemainder (std::list< MultivariatePolynomialMR >::const_iterator ideallistBegin, std::list< MultivariatePolynomialMR >::const_iterator ideallistEnd) const
 Calculates the remainder with respect to the ideal.
MultivariatePolynomialMR normalized ()
 
          

MultivariatePolynomialMR multiply (const MultivariateTermMR &t1) const

Static Public Member Functions

static const
MultivariatePolynomialMR 
SPol (const MultivariatePolynomialMR &p1, const MultivariatePolynomialMR &p2)
 Calculates the S-polynomial of p1 and p2.
static bool sortByLeadingTerm (const MultivariatePolynomialMR &m1, const MultivariatePolynomialMR &m2)

Protected Attributes

MonomMRCompare mCmp
 Ordering of Terms.
std::set< MultivariateTermMR,
MonomMRCompare
mTerms
 Set of Terms.

Friends

bool operator== (const MultivariatePolynomialMR &p1, const MultivariatePolynomialMR &p2)
bool operator!= (const MultivariatePolynomialMR &p1, const MultivariatePolynomialMR &p2)
const MultivariatePolynomialMR operator+ (const MultivariatePolynomialMR &p1, const MultivariatePolynomialMR &p2)
const MultivariatePolynomialMR operator+ (const MultivariatePolynomialMR &p1, const MultivariateTermMR &t1)
const MultivariatePolynomialMR operator+ (const MultivariateTermMR &t1, MultivariatePolynomialMR &p1)
const MultivariatePolynomialMR operator+ (const MultivariatePolynomialMR &p1, const MultivariateMonomialMR &m1)
const MultivariatePolynomialMR operator+ (const MultivariateMonomialMR &m1, const MultivariatePolynomialMR &p1)
const MultivariatePolynomialMR operator- (const MultivariatePolynomialMR &p1, const MultivariatePolynomialMR &p2)
const MultivariatePolynomialMR operator- (const MultivariatePolynomialMR &p1)
const MultivariatePolynomialMR operator* (const MultivariatePolynomialMR &p1, const MultivariateTermMR &t1)
const MultivariatePolynomialMR operator* (const MultivariateTermMR &t1, MultivariatePolynomialMR &p1)
const MultivariatePolynomialMR operator* (const MultivariatePolynomialMR &p1, const MultivariateMonomialMR &m1)
const MultivariatePolynomialMR operator* (const MultivariateMonomialMR &m1, const MultivariatePolynomialMR &p1)
std::ostream & operator<< (std::ostream &os, const MultivariatePolynomialMR &rhs)

Detailed Description

A class for a multivariate polynomial providing a degree-based representation.

Author:
Sebastian Junges
Since:
2011-11-26
Version:
2012-01-31

Definition at line 106 of file MultivariatePolynomialMR.h.


Constructor & Destructor Documentation

Parameters:
t1
comp

Definition at line 55 of file MultivariatePolynomialMR.cpp.

References mTerms.

Parameters:
t1
t2
comp

Definition at line 62 of file MultivariatePolynomialMR.cpp.

References mTerms.

Parameters:
begin
last
comp

Definition at line 70 of file MultivariatePolynomialMR.cpp.

GiNaCRA::MultivariatePolynomialMR::MultivariatePolynomialMR ( const GiNaC::ex &  expr,
const MonomMRCompare cmp 
)

Constructs a multivariate polynomial with standard variables using graded degree lexicographic monomial ordering.

Parameters:
expra polynomial
cmpthe ordering

Definition at line 106 of file MultivariatePolynomialMR.cpp.

References GiNaCRA::VariableListPool::getVariables(), GiNaC::is_constant(), and mTerms.

GiNaCRA::MultivariatePolynomialMR::MultivariatePolynomialMR ( const sMT_It  begin1,
const sMT_It  last1,
const sMT_It  begin2,
const sMT_It  last2,
const MonomMRCompare comp 
)

Creates an object with the sum of the given terms.

Parameters:
begin1
last1
begin2
last2
compMonomial Ordering. Note that if this is different from the order of the sets 1 and 2, the creation of the object is slow.

Definition at line 75 of file MultivariatePolynomialMR.cpp.

References GiNaCRA::MonomMRCompare::GetMonomOrdering(), mCmp, and mTerms.


Member Function Documentation

MultivariatePolynomialMR GiNaCRA::MultivariatePolynomialMR::CalculateRemainder ( std::list< MultivariatePolynomialMR >::const_iterator  ideallistBegin,
std::list< MultivariatePolynomialMR >::const_iterator  ideallistEnd 
) const

Calculates the remainder with respect to the ideal.

Parameters:
ideallistBegin
ideallistEnd
Returns:

Definition at line 517 of file MultivariatePolynomialMR.cpp.

References GiNaCRA::MultivariateTermMR::divby(), isZero(), lterm(), mCmp, mTerms, and MultivariatePolynomialMR().

Referenced by GiNaCRA::Groebner::solve().

Definition at line 166 of file MultivariatePolynomialMR.h.

References mCmp.

Referenced by SPol().

Definition at line 180 of file MultivariatePolynomialMR.h.

References mTerms.

Referenced by GiNaCRA::Groebner::solve().

Checks whether there are any terms.

Returns:
true, if zero

Definition at line 175 of file MultivariatePolynomialMR.h.

References mTerms.

Referenced by CalculateRemainder(), lmon(), lterm(), and GiNaCRA::Groebner::solve().

GiNaC::ex GiNaCRA::MultivariatePolynomialMR::lcoeff ( ) const [inline]
Returns:
the coefficient of the leading term

Definition at line 211 of file MultivariatePolynomialMR.h.

References mTerms.

Referenced by normalized().

Returns:
The leading monomial with respect to the current ordering

Definition at line 188 of file MultivariatePolynomialMR.h.

References isZero(), and mTerms.

Referenced by sortByLeadingTerm(), and SPol().

Returns:
the leading term with respect to the current ordering

Definition at line 201 of file MultivariatePolynomialMR.h.

References isZero(), and mTerms.

Referenced by CalculateRemainder(), and SPol().

Parameters:
t1
Returns:

Definition at line 293 of file MultivariatePolynomialMR.h.

Referenced by SPol().

unsigned GiNaCRA::MultivariatePolynomialMR::nrOfTerms ( ) const [inline]
Returns:
the number of terms
Runtime complexity:
constant

Definition at line 220 of file MultivariatePolynomialMR.h.

References mTerms.

Referenced by SPol().

Calculates the S-polynomial of p1 and p2.

Parameters:
p1
p2
Returns:
S-Polynomial

Definition at line 492 of file MultivariatePolynomialMR.cpp.

References getMonomOrder(), GiNaCRA::MultivariateTermMR::lcmdivt(), lmon(), lterm(), mCmp, multiply(), MultivariatePolynomialMR(), nrOfTerms(), and truncLT().

Referenced by GiNaCRA::Groebner::solve().

GiNaC expression representing the same multivariate polynomial.

Returns:

Definition at line 239 of file MultivariatePolynomialMR.cpp.

References mTerms.

Returns:
a MultivariatePolynomial without the leading term.

Definition at line 229 of file MultivariatePolynomialMR.h.

References mCmp, mTerms, and MultivariatePolynomialMR().

Referenced by SPol().


Friends And Related Function Documentation

bool operator!= ( const MultivariatePolynomialMR p1,
const MultivariatePolynomialMR p2 
) [friend]

Definition at line 257 of file MultivariatePolynomialMR.cpp.

const MultivariatePolynomialMR operator* ( const MultivariatePolynomialMR p1,
const MultivariateTermMR t1 
) [friend]

Definition at line 449 of file MultivariatePolynomialMR.cpp.

const MultivariatePolynomialMR operator* ( const MultivariateTermMR t1,
MultivariatePolynomialMR p1 
) [friend]

Definition at line 461 of file MultivariatePolynomialMR.cpp.

const MultivariatePolynomialMR operator* ( const MultivariatePolynomialMR p1,
const MultivariateMonomialMR m1 
) [friend]

Definition at line 466 of file MultivariatePolynomialMR.cpp.

const MultivariatePolynomialMR operator* ( const MultivariateMonomialMR m1,
const MultivariatePolynomialMR p1 
) [friend]

Definition at line 478 of file MultivariatePolynomialMR.cpp.

const MultivariatePolynomialMR operator+ ( const MultivariatePolynomialMR p1,
const MultivariatePolynomialMR p2 
) [friend]

Definition at line 265 of file MultivariatePolynomialMR.cpp.

const MultivariatePolynomialMR operator+ ( const MultivariatePolynomialMR p1,
const MultivariateTermMR t1 
) [friend]

Definition at line 314 of file MultivariatePolynomialMR.cpp.

const MultivariatePolynomialMR operator+ ( const MultivariateTermMR t1,
MultivariatePolynomialMR p1 
) [friend]

Definition at line 342 of file MultivariatePolynomialMR.cpp.

const MultivariatePolynomialMR operator+ ( const MultivariatePolynomialMR p1,
const MultivariateMonomialMR m1 
) [friend]

Definition at line 347 of file MultivariatePolynomialMR.cpp.

const MultivariatePolynomialMR operator+ ( const MultivariateMonomialMR m1,
const MultivariatePolynomialMR p1 
) [friend]

Definition at line 376 of file MultivariatePolynomialMR.cpp.

const MultivariatePolynomialMR operator- ( const MultivariatePolynomialMR p1,
const MultivariatePolynomialMR p2 
) [friend]

Definition at line 381 of file MultivariatePolynomialMR.cpp.

const MultivariatePolynomialMR operator- ( const MultivariatePolynomialMR p1) [friend]

Definition at line 432 of file MultivariatePolynomialMR.cpp.

std::ostream& operator<< ( std::ostream &  os,
const MultivariatePolynomialMR rhs 
) [friend]
Parameters:
os
rhs
Returns:

Definition at line 483 of file MultivariatePolynomialMR.cpp.

bool operator== ( const MultivariatePolynomialMR p1,
const MultivariatePolynomialMR p2 
) [friend]

Definition at line 249 of file MultivariatePolynomialMR.cpp.


Field Documentation


The documentation for this class was generated from the following files: