GiNaCRA
0.6.4
|
Type for a sorted list of RealAlgebraicNumberPtr. More...
#include <CAD.h>
Public Member Functions | |
pair< iterator, bool > | insert (const RealAlgebraicNumberPtr &r) |
Inserts an element into the sorted list at the correct position according to the order. | |
template<class InputIterator > | |
void | insert (InputIterator first, InputIterator last) |
Inserts a range of elements into the sorted list. | |
void | insert (const SampleList &l) |
Inserts another sampleList. | |
SampleList::iterator | remove (SampleList::iterator position) |
Safely remove the element at position. | |
const RealAlgebraicNumberPtr | next () |
Determines the next sample in the order of insertion with no particular preference. | |
const RealAlgebraicNumberPtr | nextNR () |
Determines the next sample in the order of insertion, preferring the numerically represented samples. | |
const RealAlgebraicNumberPtr | nextNonroot () |
Determines the next sample in the order of insertion, preferring the non-root samples. | |
const RealAlgebraicNumberPtr | nextRoot () |
Determines the next sample in the order of insertion, preferring the non-root samples. | |
void | pop () |
Removes the element returned by next() from the list. | |
void | popNR () |
Removes the element returned by nextNR() from the list. | |
void | popNonroot () |
Removes the element returned by nextNonroot() from the list. | |
void | popRoot () |
Removes the element returned by nextRoot() from the list. | |
pair< SampleSimplification, bool > | simplify () |
Traverse all interval-represented samples and determine whether they could be simplified by numeric representations. | |
bool | contains (RealAlgebraicNumberPtr r) const |
Determines containment of r in the list. | |
bool | emptyNR () const |
Answers whether there are numerically represented samples left. | |
bool | emptyIR () const |
Answers whether there are interval-represented samples left. | |
bool | emptyNonroot () const |
Answers whether there are non-root represented samples left. | |
bool | emptyRoot () const |
Answers whether there are root samples left. | |
Data Fields | |
T | elements |
STL member. | |
Private Member Functions | |
void | removeFromNonrootRoot (RealAlgebraicNumberPtr r) |
void | removeFromQueue (RealAlgebraicNumberPtr r) |
void | removeFromNRIR (RealAlgebraicNumberPtr r) |
Private Attributes | |
list< RealAlgebraicNumberPtr > | mQueue |
Queue containing all samples in the order of their insertion. | |
pair< list < RealAlgebraicNumberNRPtr > , list < RealAlgebraicNumberIRPtr > > | mNRsIRs |
Pair having in the first component one queue containing all numerically represented samples in the order of their insertion, and in the second component one queue containing all interval-represented samples in the order of their insertion. | |
pair< list < RealAlgebraicNumberPtr > , list< RealAlgebraicNumberPtr > > | mNonrootsRoots |
Pair having in the first component one queue containing all non-root samples in the order of their insertion, and in the second component one queue containing all root samples in the order of their insertion. |
Type for a sorted list of RealAlgebraicNumberPtr.
bool GiNaCRA::SampleList::contains | ( | RealAlgebraicNumberPtr | r | ) | const [inline] |
Determines containment of r in the list.
Definition at line 375 of file CAD.h.
References GiNaCRA::RealAlgebraicNumberFactory::less().
bool GiNaCRA::SampleList::emptyIR | ( | ) | const [inline] |
bool GiNaCRA::SampleList::emptyNonroot | ( | ) | const [inline] |
Answers whether there are non-root represented samples left.
Definition at line 403 of file CAD.h.
References mNonrootsRoots.
bool GiNaCRA::SampleList::emptyNR | ( | ) | const [inline] |
bool GiNaCRA::SampleList::emptyRoot | ( | ) | const [inline] |
Answers whether there are root samples left.
Definition at line 412 of file CAD.h.
References mNonrootsRoots.
pair<iterator, bool> GiNaCRA::SampleList::insert | ( | const RealAlgebraicNumberPtr & | r | ) | [inline] |
Inserts an element into the sorted list at the correct position according to the order.
r | RealAlgebraicNumberPtr to be inserted |
pair::first
set to an iterator pointing to either the newly inserted element or to the element that already had its same value in the set. The pair::second
element in the pair is set to true
if a new element was inserted or false
if an element with the same value existed. If a numeric representation is inserted, the method replaces a possibly existing interval representation. Definition at line 82 of file CAD.h.
References GiNaCRA::RealAlgebraicNumberFactory::equal(), GiNaCRA::RealAlgebraicNumberFactory::less(), mNonrootsRoots, mNRsIRs, and mQueue.
Referenced by insert(), GiNaCRA::CAD::liftCheck(), and GiNaCRA::CAD::samples().
void GiNaCRA::SampleList::insert | ( | InputIterator | first, |
InputIterator | last | ||
) | [inline] |
Inserts a range of elements into the sorted list.
first | defining the first position to be inserted |
last | defining the last position up to which all elements, but *last, are inserted |
Definition at line 112 of file CAD.h.
References insert().
void GiNaCRA::SampleList::insert | ( | const SampleList & | l | ) | [inline] |
Inserts another sampleList.
l | other sampleList |
Definition at line 123 of file CAD.h.
References insert().
const RealAlgebraicNumberPtr GiNaCRA::SampleList::next | ( | ) | [inline] |
const RealAlgebraicNumberPtr GiNaCRA::SampleList::nextNonroot | ( | ) | [inline] |
Determines the next sample in the order of insertion, preferring the non-root samples.
Definition at line 175 of file CAD.h.
References mNonrootsRoots.
Referenced by popNonroot().
const RealAlgebraicNumberPtr GiNaCRA::SampleList::nextNR | ( | ) | [inline] |
Determines the next sample in the order of insertion, preferring the numerically represented samples.
Before returning an interval-represented sample, the method tries to simplify the sample.
Definition at line 161 of file CAD.h.
References mNRsIRs.
Referenced by popNR().
const RealAlgebraicNumberPtr GiNaCRA::SampleList::nextRoot | ( | ) | [inline] |
Determines the next sample in the order of insertion, preferring the non-root samples.
Definition at line 189 of file CAD.h.
References mNonrootsRoots.
Referenced by popRoot().
void GiNaCRA::SampleList::pop | ( | ) | [inline] |
Removes the element returned by next() from the list.
Definition at line 202 of file CAD.h.
References GiNaCRA::RealAlgebraicNumberFactory::less(), mQueue, next(), removeFromNonrootRoot(), and removeFromNRIR().
void GiNaCRA::SampleList::popNonroot | ( | ) | [inline] |
Removes the element returned by nextNonroot() from the list.
The method does nothing if there is no non-root.
Definition at line 250 of file CAD.h.
References GiNaCRA::RealAlgebraicNumberFactory::less(), mNonrootsRoots, nextNonroot(), removeFromNRIR(), and removeFromQueue().
void GiNaCRA::SampleList::popNR | ( | ) | [inline] |
Removes the element returned by nextNR() from the list.
Definition at line 224 of file CAD.h.
References GiNaCRA::RealAlgebraicNumberFactory::less(), mNRsIRs, nextNR(), removeFromNonrootRoot(), and removeFromQueue().
void GiNaCRA::SampleList::popRoot | ( | ) | [inline] |
Removes the element returned by nextRoot() from the list.
The method does nothing if there is no root.
Definition at line 276 of file CAD.h.
References GiNaCRA::RealAlgebraicNumberFactory::less(), mNonrootsRoots, nextRoot(), removeFromNRIR(), and removeFromQueue().
SampleList::iterator GiNaCRA::SampleList::remove | ( | SampleList::iterator | position | ) | [inline] |
Safely remove the element at position.
position |
Definition at line 133 of file CAD.h.
References removeFromNonrootRoot(), removeFromNRIR(), and removeFromQueue().
void GiNaCRA::SampleList::removeFromNonrootRoot | ( | RealAlgebraicNumberPtr | r | ) | [inline, private] |
void GiNaCRA::SampleList::removeFromNRIR | ( | RealAlgebraicNumberPtr | r | ) | [inline, private] |
void GiNaCRA::SampleList::removeFromQueue | ( | RealAlgebraicNumberPtr | r | ) | [inline, private] |
pair< SampleSimplification, bool> GiNaCRA::SampleList::simplify | ( | ) | [inline] |
Traverse all interval-represented samples and determine whether they could be simplified by numeric representations.
If so, move these samples to the NRs.
Definition at line 305 of file CAD.h.
References GiNaCRA::RealAlgebraicNumberFactory::less(), mNonrootsRoots, mNRsIRs, mQueue, and GiNaCRA::print().
T std::list< T >::elements [inherited] |
STL member.
pair<list<RealAlgebraicNumberPtr>, list<RealAlgebraicNumberPtr> > GiNaCRA::SampleList::mNonrootsRoots [private] |
Pair having in the first component one queue containing all non-root samples in the order of their insertion, and in the second component one queue containing all root samples in the order of their insertion.
Definition at line 70 of file CAD.h.
Referenced by emptyNonroot(), emptyRoot(), insert(), nextNonroot(), nextRoot(), popNonroot(), popRoot(), removeFromNonrootRoot(), and simplify().
pair<list<RealAlgebraicNumberNRPtr>, list<RealAlgebraicNumberIRPtr> > GiNaCRA::SampleList::mNRsIRs [private] |
Pair having in the first component one queue containing all numerically represented samples in the order of their insertion, and in the second component one queue containing all interval-represented samples in the order of their insertion.
Definition at line 67 of file CAD.h.
Referenced by emptyIR(), emptyNR(), insert(), nextNR(), popNR(), removeFromNRIR(), and simplify().
list<RealAlgebraicNumberPtr> GiNaCRA::SampleList::mQueue [private] |
Queue containing all samples in the order of their insertion.
Definition at line 64 of file CAD.h.
Referenced by insert(), next(), pop(), removeFromQueue(), and simplify().