DGtal 1.4.0
|
#include <DGtal/math/MPolynomial.h>
Public Types | |
typedef TAlloc | Alloc |
typedef std::vector< T, Alloc >::size_type | Size |
Public Member Functions | |
IVector (const Alloc &allocator=Alloc()) | |
IVector (Size aSize, const Alloc &allocator=Alloc()) | |
IVector (Size aSize, const T &entry, const Alloc &allocator=Alloc()) | |
Size | size () const |
void | resize (Size aSize, const T &entry=T()) |
const T & | operator[] (Size i) const |
T & | operator[] (Size i) |
const T & | back () const |
T & | back () |
void | swap (IVector &v) |
Alloc | get_allocator () const |
Alloc | getAllocator () const |
Private Attributes | |
std::vector< T, Alloc > | myVec |
Next, we want to define the storage class IVector<T, Alloc, usePointers>. It behaves like a subset of std::vector<T>'s capabilities (i.e. access elements, get size, set size, get last element, swap with other storage of same type), but uses std::vector<T*> in case usePointers is true.
The advantage of this approach is that if T is a more complex object, reallocation done with resize() can be very costly.
This generic version is just using std::vector<T>.
Definition at line 731 of file MPolynomial.h.
typedef TAlloc DGtal::IVector< T, TAlloc, usePointers >::Alloc |
Definition at line 734 of file MPolynomial.h.
typedef std::vector<T,Alloc>::size_type DGtal::IVector< T, TAlloc, usePointers >::Size |
Definition at line 735 of file MPolynomial.h.
|
inline |
Definition at line 740 of file MPolynomial.h.
|
inline |
Definition at line 744 of file MPolynomial.h.
|
inline |
Definition at line 748 of file MPolynomial.h.
|
inline |
Definition at line 777 of file MPolynomial.h.
References DGtal::IVector< T, TAlloc, usePointers >::myVec.
|
inline |
Definition at line 772 of file MPolynomial.h.
References DGtal::IVector< T, TAlloc, usePointers >::myVec.
Referenced by DGtal::MPolynomial< n, TRing, TAlloc >::leading().
|
inline |
Definition at line 787 of file MPolynomial.h.
References DGtal::IVector< T, TAlloc, usePointers >::myVec.
|
inline |
Definition at line 792 of file MPolynomial.h.
References DGtal::IVector< T, TAlloc, usePointers >::myVec.
Referenced by DGtal::MPolynomial< n, TRing, TAlloc >::getAllocator().
|
inline |
Definition at line 767 of file MPolynomial.h.
References DGtal::IVector< T, TAlloc, usePointers >::myVec.
|
inline |
Definition at line 762 of file MPolynomial.h.
References DGtal::IVector< T, TAlloc, usePointers >::myVec.
|
inline |
Definition at line 757 of file MPolynomial.h.
References DGtal::IVector< T, TAlloc, usePointers >::myVec.
Referenced by DGtal::MPolynomialDerivativeComputer< N, n, Ring, Alloc >::computeDerivative(), DGtal::MPolynomialDerivativeComputer< 0, n, Ring, Alloc >::computeDerivative(), DGtal::MPolynomial< n, TRing, TAlloc >::normalize(), DGtal::MPolynomial< n, TRing, TAlloc >::operator+=(), DGtal::MPolynomial< n, TRing, TAlloc >::operator+=(), DGtal::MPolynomial< n, TRing, TAlloc >::operator+=(), DGtal::MPolynomial< n, TRing, TAlloc >::operator-=(), DGtal::MPolynomial< n, TRing, TAlloc >::operator-=(), DGtal::MPolynomial< n, TRing, TAlloc >::operator-=(), DGtal::MPolynomial< n, TRing, TAlloc >::operator=(), and DGtal::MPolynomial< n, TRing, TAlloc >::operator[]().
|
inline |
Definition at line 752 of file MPolynomial.h.
References DGtal::IVector< T, TAlloc, usePointers >::myVec.
Referenced by DGtal::MPolynomial< n, TRing, TAlloc >::degree(), DGtal::MPolynomialEvaluator< n, TRing, TAlloc, TX >::evaluate(), DGtal::MPolynomial< n, TRing, TAlloc >::isZero(), DGtal::MPolynomial< n, TRing, TAlloc >::leading(), DGtal::MPolynomial< n, TRing, TAlloc >::MPolynomial(), DGtal::MPolynomial< n, TRing, TAlloc >::normalize(), DGtal::MPolynomialEvaluator< n, TRing, TAlloc, TX >::operator MPolyNM1(), DGtal::MPolynomialEvaluator< 1, TRing, TAlloc, TX >::operator X(), DGtal::MPolynomial< n, TRing, TAlloc >::operator*(), DGtal::MPolynomial< n, TRing, TAlloc >::operator*(), DGtal::MPolynomial< n, TRing, TAlloc >::operator*=(), DGtal::MPolynomial< n, TRing, TAlloc >::operator+=(), DGtal::MPolynomial< n, TRing, TAlloc >::operator+=(), DGtal::MPolynomial< n, TRing, TAlloc >::operator+=(), DGtal::MPolynomial< n, TRing, TAlloc >::operator-(), DGtal::MPolynomial< n, TRing, TAlloc >::operator-=(), DGtal::MPolynomial< n, TRing, TAlloc >::operator-=(), DGtal::MPolynomial< n, TRing, TAlloc >::operator-=(), DGtal::MPolynomial< n, TRing, TAlloc >::operator/(), DGtal::MPolynomial< n, TRing, TAlloc >::operator/=(), DGtal::MPolynomial< n, TRing, TAlloc >::operator=(), DGtal::MPolynomial< n, TRing, TAlloc >::operator==(), DGtal::MPolynomial< n, TRing, TAlloc >::operator==(), DGtal::MPolynomial< n, TRing, TAlloc >::operator[](), DGtal::MPolynomial< n, TRing, TAlloc >::operator[](), and DGtal::MPolynomial< n, TRing, TAlloc >::selfDisplay().
|
inline |
Definition at line 782 of file MPolynomial.h.
References DGtal::IVector< T, TAlloc, usePointers >::myVec.
Referenced by DGtal::MPolynomial< n, TRing, TAlloc >::swap().
|
private |
Definition at line 737 of file MPolynomial.h.
Referenced by DGtal::IVector< T, TAlloc, usePointers >::back(), DGtal::IVector< T, TAlloc, usePointers >::back(), DGtal::IVector< T, TAlloc, true >::back(), DGtal::IVector< T, TAlloc, true >::back(), DGtal::IVector< T, TAlloc, true >::copy_from(), DGtal::IVector< T, TAlloc, true >::create(), DGtal::IVector< T, TAlloc, true >::free(), DGtal::IVector< T, TAlloc, usePointers >::get_allocator(), DGtal::IVector< T, TAlloc, true >::get_allocator(), DGtal::IVector< T, TAlloc, usePointers >::getAllocator(), DGtal::IVector< T, TAlloc, true >::getAllocator(), DGtal::IVector< T, TAlloc, true >::operator=(), DGtal::IVector< T, TAlloc, usePointers >::operator[](), DGtal::IVector< T, TAlloc, usePointers >::operator[](), DGtal::IVector< T, TAlloc, true >::operator[](), DGtal::IVector< T, TAlloc, true >::operator[](), DGtal::IVector< T, TAlloc, usePointers >::resize(), DGtal::IVector< T, TAlloc, true >::resize(), DGtal::IVector< T, TAlloc, usePointers >::size(), DGtal::IVector< T, TAlloc, true >::size(), DGtal::IVector< T, TAlloc, usePointers >::swap(), DGtal::IVector< T, TAlloc, true >::swap(), and DGtal::IVector< T, TAlloc, true >::~IVector().