DGtal 1.3.0
|
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 495 of file MPolynomial.h.
typedef TAlloc DGtal::MPolynomial< 0, TRing, TAlloc >::Alloc |
Definition at line 499 of file MPolynomial.h.
typedef TRing DGtal::MPolynomial< 0, TRing, TAlloc >::Ring |
Definition at line 498 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 514 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 525 of file MPolynomial.h.
|
inline |
Definition at line 700 of file MPolynomial.h.
|
inline |
Definition at line 532 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 541 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Difference operator.
v | any value in the ring. |
Definition at line 674 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Evaluation operator for the polynomial.
Definition at line 561 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 571 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Self-multiplication by value v.
v | any value in the ring. |
Definition at line 620 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 591 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Self-addition by value v.
v | any value in the ring. |
Definition at line 642 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Unary minus operator.
Definition at line 610 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Subtraction by value v.
v | any value in the ring. |
Definition at line 601 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Self-subtraction by value v.
v | any value in the ring. |
Definition at line 653 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 581 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Self-division by value v.
v | any value in the ring. |
Definition at line 631 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 551 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Equality operator.
v | any value in the ring. |
Definition at line 664 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Outputs itself in the stream s.
s | any stream |
Definition at line 683 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
inline |
Swaps two polynomials.
p | any zero-degree polynomial. |
Definition at line 692 of file MPolynomial.h.
References DGtal::MPolynomial< n, TRing, TAlloc >::myValue.
|
private |
Definition at line 502 of file MPolynomial.h.
|
private |
Definition at line 503 of file MPolynomial.h.