DGtal
1.5.beta
|
Aim: Specialization of MPolynomial for degree 0. More...
#include <DGtal/math/MPolynomial.h>
Public Types | |
typedef TRing | Ring |
typedef TAlloc | Alloc |
Public Member Functions | |
MPolynomial (const Ring &v=0, const Alloc &allocator=Alloc()) | |
MPolynomial (const Alloc &allocator) | |
bool | isZero () const |
operator const Ring & () const | |
MPolynomial & | operator= (const Ring &v) |
Ring | operator() () const |
MPolynomial | operator* (const Ring &v) const |
MPolynomial | operator/ (const Ring &v) const |
MPolynomial | operator+ (const Ring &v) const |
MPolynomial | operator- (const Ring &v) const |
MPolynomial | operator- () const |
MPolynomial & | operator*= (const Ring &v) |
MPolynomial & | operator/= (const Ring &v) |
MPolynomial & | operator+= (const Ring &v) |
MPolynomial & | operator-= (const Ring &v) |
bool | operator== (const Ring &v) const |
bool | operator!= (const Ring &v) const |
void | selfDisplay (std::ostream &s, int) const |
void | swap (MPolynomial &p) |
Alloc | getAllocator () const |
Private Attributes | |
Alloc | myAllocator |
Ring | myValue |
Aim: Specialization of MPolynomial for degree 0.
Description of template class 'MPolynomial'
Stores a polynomial of degree 0, i.e. a scalar of type T. We assume that the type T is not "too" complex, otherwise this class will be partially not very effective.
TRing | the type chosen for the polynomial, defines also the type of the coefficents (generally int, float or double). |
TAlloc | is an allocator for TRing, for example std::allocator<TRing>; this is also the default parameter. Usually this parameter does not needs to be changed. |
This class is a backport from Spielwiese.
Definition at line 505 of file MPolynomial.h.
typedef TAlloc DGtal::MPolynomial< 0, TRing, TAlloc >::Alloc |
Definition at line 509 of file MPolynomial.h.
typedef TRing DGtal::MPolynomial< 0, TRing, TAlloc >::Ring |
Definition at line 508 of file MPolynomial.h.
|
inline |
Constructor (default, or from ring value). Creates the constant polynomial v.
v | any value in the ring. |
allocator | an allocator for the polynomial. |
Definition at line 524 of file MPolynomial.h.
|
inline |
Allocator constructor. Creates the constant polynomial 0, where 0 is the default value of the ring.
allocator | an allocator for the polynomial. |
Definition at line 535 of file MPolynomial.h.
|
inline |
Definition at line 710 of file MPolynomial.h.
|
inline |
Definition at line 542 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Const cast operator to Ring value. Returns the coefficient value of this constant polynomial.
Definition at line 551 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Difference operator.
v | any value in the ring. |
Definition at line 684 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Evaluation operator for the polynomial.
Definition at line 571 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Multiplication by value v.
v | any value in the ring. |
Definition at line 581 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::MPolynomial(), and DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Self-multiplication by value v.
v | any value in the ring. |
Definition at line 630 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Addition by value v.
v | any value in the ring. |
Definition at line 601 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::MPolynomial(), and DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Self-addition by value v.
v | any value in the ring. |
Definition at line 652 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Unary minus operator.
Definition at line 620 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::MPolynomial(), and DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Subtraction by value v.
v | any value in the ring. |
Definition at line 611 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::MPolynomial(), and DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Self-subtraction by value v.
v | any value in the ring. |
Definition at line 663 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Division by value v.
v | any value in the ring. |
Definition at line 591 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::MPolynomial(), and DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Self-division by value v.
v | any value in the ring. |
Definition at line 641 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Assigment from coefficient in the ring.
v | any value in the ring. |
Definition at line 561 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Equality operator.
v | any value in the ring. |
Definition at line 674 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Outputs itself in the stream s.
s | any stream |
Definition at line 693 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Swaps two polynomials.
p | any zero-degree polynomial. |
Definition at line 702 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
private |
Definition at line 512 of file MPolynomial.h.
|
private |
Definition at line 513 of file MPolynomial.h.