GiNaCRA  0.6.4
GiNaCRA::MultivariateTermMR Class Reference

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

#include <MultivariateTermMR.h>

Inheritance diagram for GiNaCRA::MultivariateTermMR:
Collaboration diagram for GiNaCRA::MultivariateTermMR:

Public Member Functions

 MultivariateTermMR ()
 Does nothing, just to be able to return something empty.
 MultivariateTermMR (unsigned size)
 MultivariateTermMR (GiNaC::ex coeff)
 MultivariateTermMR (const MultivariateMonomialMR &m1, const GiNaC::ex &coeff)
 MultivariateTermMR (const MultivariateMonomialMR &m1, const MultivariateCoefficientMR &coeff)
 MultivariateTermMR (const MultivariateMonomialMR &m1)
bool hasEqualExponents (const MultivariateTermMR &m2) const
 Compares the monomials.
GiNaC::ex toEx () const
GiNaC::ex getCoeffExpr () const
MultivariateCoefficientMR getCoeff () const
MultivariateTermMR negate () const
const MultivariateTermMR lcmdivt (const MultivariateMonomialMR &m1) const
bool dividable (const MultivariateTermMR &denom) const
std::pair< MultivariateTermMR,
bool > 
divby (const MultivariateTermMR &denom) const
MultivariateTermMR divide (const ex &c) const
unsigned tdeg () const
bool constant () const

Static Public Member Functions

static const MultivariateMonomialMR lcm (const MultivariateMonomialMR &m1, const MultivariateMonomialMR &m2)
 Computes the least common multiple of the two parameters.
static bool LexCompare (const MultivariateMonomialMR &m1, const MultivariateMonomialMR &m2)
static bool GrLexCompare (const MultivariateMonomialMR &m1, const MultivariateMonomialMR &m2)
static bool GrRevLexCompare (const MultivariateMonomialMR &m1, const MultivariateMonomialMR &m2)

Protected Attributes

MultivariateCoefficientMR mCoeff

Private Types

typedef MultivariateMonomialMR super

Friends

bool operator== (const MultivariateTermMR &t1, const MultivariateTermMR &t2)
const MultivariateTermMR operator* (const MultivariateTermMR &t1, const MultivariateTermMR &t2)
const MultivariateTermMR operator* (const MultivariateTermMR &t1, const MultivariateMonomialMR &m1)
const MultivariateTermMR operator* (const MultivariateMonomialMR &m1, const MultivariateTermMR &t1)
std::ostream & operator<< (std::ostream &os, const MultivariateTermMR &rhs)
class MultivariateTermMR
const MultivariateMonomialMR operator* (const MultivariateMonomialMR &m1, const MultivariateMonomialMR &m2)
const MultivariateMonomialMR operator/ (const MultivariateMonomialMR &nom, const MultivariateMonomialMR &denom)
bool operator!= (const MultivariateMonomialMR &lhs, const MultivariateMonomialMR &rhs)
bool operator== (const MultivariateMonomialMR &lhs, const MultivariateMonomialMR &rhs)
std::ostream & operator<< (std::ostream &os, const MultivariateMonomialMR &rhs)

Detailed Description

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

Author:
Sebastian Junges
Since:
2010-11-26
Version:
2011-12-08

Notation is following http://www.possibility.com/Cpp/CppCodingStandard.html.

Definition at line 47 of file MultivariateTermMR.h.


Member Typedef Documentation


Constructor & Destructor Documentation

Does nothing, just to be able to return something empty.

Definition at line 55 of file MultivariateTermMR.h.

Referenced by divby(), divide(), lcmdivt(), and negate().

Parameters:
sizeThe number of variables expected, to allocate space at initialization.

Definition at line 63 of file MultivariateTermMR.h.

GiNaCRA::MultivariateTermMR::MultivariateTermMR ( GiNaC::ex  coeff) [inline]
Parameters:
coeff

Definition at line 72 of file MultivariateTermMR.h.

GiNaCRA::MultivariateTermMR::MultivariateTermMR ( const MultivariateMonomialMR m1,
const GiNaC::ex &  coeff 
) [inline]
Parameters:
m1
coeff

Definition at line 82 of file MultivariateTermMR.h.

Parameters:
m1
coeff

Definition at line 92 of file MultivariateTermMR.h.

Parameters:
m1

Definition at line 101 of file MultivariateTermMR.h.


Member Function Documentation

bool GiNaCRA::MultivariateMonomialMR::constant ( ) const [inline, inherited]

Definition at line 87 of file MultivariateMonomialMR.h.

References GiNaCRA::MultivariateMonomialMR::tdeg().

Parameters:
denom
Returns:

Definition at line 67 of file MultivariateTermMR.cpp.

References GiNaCRA::MultivariateMonomialMR::mExponents, and GiNaCRA::MultivariateMonomialMR::mTotDeg.

Referenced by divby().

MultivariateTermMR GiNaCRA::MultivariateTermMR::divide ( const ex &  c) const [inline]
Parameters:
c
Returns:

Definition at line 185 of file MultivariateTermMR.h.

References GiNaCRA::MultivariateCoefficientMR::getExpression(), mCoeff, and MultivariateTermMR().

Returns:
the coefficient

Definition at line 145 of file MultivariateTermMR.h.

References mCoeff.

GiNaC::ex GiNaCRA::MultivariateTermMR::getCoeffExpr ( ) const [inline]
Returns:

Definition at line 136 of file MultivariateTermMR.h.

References GiNaCRA::MultivariateCoefficientMR::getExpression(), and mCoeff.

Referenced by GiNaCRA::operator+(), and toEx().

bool GiNaCRA::MultivariateMonomialMR::GrLexCompare ( const MultivariateMonomialMR m1,
const MultivariateMonomialMR m2 
) [static, inherited]
Parameters:
m1
m2
Returns:
true iff m1 < m2

Definition at line 211 of file MultivariateMonomialMR.cpp.

References GiNaCRA::MultivariateMonomialMR::LexCompare(), and GiNaCRA::MultivariateMonomialMR::tdeg().

Referenced by GiNaCRA::MonomMRCompare::MonomMRCompare().

bool GiNaCRA::MultivariateMonomialMR::GrRevLexCompare ( const MultivariateMonomialMR m1,
const MultivariateMonomialMR m2 
) [static, inherited]
Parameters:
m1
m2
Returns:
true iff m1 < m2

Definition at line 222 of file MultivariateMonomialMR.cpp.

References GiNaCRA::MultivariateMonomialMR::LexCompare(), and GiNaCRA::MultivariateMonomialMR::tdeg().

Compares the monomials.

Parameters:
m2
Returns:

Definition at line 116 of file MultivariateTermMR.h.

References GiNaCRA::MultivariateMonomialMR::mExponents, and GiNaCRA::MultivariateMonomialMR::mTotDeg.

Computes the least common multiple of the two parameters.

Parameters:
m1
m2
Returns:
A monomial representing the least common multiple

Definition at line 91 of file MultivariateMonomialMR.cpp.

References GiNaCRA::MultivariateMonomialMR::mExponents, and GiNaCRA::MultivariateMonomialMR::tdeg().

Returns:
The additive inverse of the term.

Definition at line 154 of file MultivariateTermMR.h.

References mCoeff, and MultivariateTermMR().

GiNaC::ex GiNaCRA::MultivariateTermMR::toEx ( ) const [inline]
Returns:

Reimplemented from GiNaCRA::MultivariateMonomialMR.

Definition at line 127 of file MultivariateTermMR.h.

References getCoeffExpr(), and GiNaCRA::MultivariateMonomialMR::toEx().


Friends And Related Function Documentation

friend class MultivariateTermMR [friend, inherited]

Definition at line 54 of file MultivariateMonomialMR.h.

bool operator!= ( const MultivariateMonomialMR lhs,
const MultivariateMonomialMR rhs 
) [friend, inherited]

Definition at line 162 of file MultivariateMonomialMR.cpp.

const MultivariateMonomialMR operator* ( const MultivariateMonomialMR m1,
const MultivariateMonomialMR m2 
) [friend, inherited]

Definition at line 233 of file MultivariateMonomialMR.cpp.

const MultivariateTermMR operator* ( const MultivariateTermMR t1,
const MultivariateTermMR t2 
) [friend]

Definition at line 157 of file MultivariateTermMR.cpp.

const MultivariateTermMR operator* ( const MultivariateTermMR t1,
const MultivariateMonomialMR m1 
) [friend]

Definition at line 162 of file MultivariateTermMR.cpp.

const MultivariateTermMR operator* ( const MultivariateMonomialMR m1,
const MultivariateTermMR t1 
) [friend]

Definition at line 167 of file MultivariateTermMR.cpp.

const MultivariateMonomialMR operator/ ( const MultivariateMonomialMR nom,
const MultivariateMonomialMR denom 
) [friend, inherited]
std::ostream& operator<< ( std::ostream &  os,
const MultivariateMonomialMR rhs 
) [friend, inherited]

Definition at line 167 of file MultivariateMonomialMR.cpp.

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

Definition at line 172 of file MultivariateTermMR.cpp.

bool operator== ( const MultivariateMonomialMR lhs,
const MultivariateMonomialMR rhs 
) [friend, inherited]

Definition at line 155 of file MultivariateMonomialMR.cpp.

bool operator== ( const MultivariateTermMR t1,
const MultivariateTermMR t2 
) [friend]

Definition at line 152 of file MultivariateTermMR.cpp.


Field Documentation


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