76 template <
class Entry>
79 typedef Entry* EntryPtr;
80 typedef Entry
const * EntryConstPtr;
137 virtual void Add (EntryPtr _entry);
138 virtual void AddFirst (EntryPtr _entry);
160 void Owner (
bool _owner);
172 template<
typename Functor>
200 template<
typename Functor>
207 template<
typename Functor>
218 template <
class Entry>
226 template <
class Entry>
242 template <
class Entry>
262 template <
class Entry>
279 template <
class Entry>
296 template <
class Entry>
304 template <
class Entry>
312 template <
class Entry>
320 template <
class Entry>
338 template <
class Entry>
346 template <
class Entry>
354 template <
class Entry>
365 template <
class Entry>
373 template <
class Entry>
382 template <
class Entry>
397 template <
class Entry>
406 std::
cerr <<
"KKQueue<Entry>::PushOnBack ***ERROR*** Operation Failed!!!" <<
std::
endl;
414 template <
class Entry>
437 template <
class Entry>
456 template <
class Entry>
468 template <
class Entry>
489 template <
class Entry>
503 template <
class Entry>
525 template <
class Entry>
526 template <
typename Functor>
539 template <
class Entry>
540 template <
typename Functor>
560 cerr <<
"KKQueue<Entry>::FindTheKthElement ***ERROR*** An invalid situation just occurred." <<
endl 561 <<
" k=" <<
k <<
", left=" <<
left <<
", right=" <<
right <<
", m=" <<
m <<
endl;
568 template <
class Entry>
569 template <
typename Functor>
595 template <
class Entry>
610 template <
class Entry>
618 template <
class Entry>
626 template <
class Entry>
629 if (
this->
size () <= 0)
637 template <
class Entry>
640 if (
this->
size () <= 0)
647 template <
class Entry>
660 template <
class Entry>
672 template <
class Entry>
683 template <
class Entry>
699 template <
class Entry>
714 template <
class Entry>
731 template <
class Entry>
737 return &((*
this)[
idx]);
744 template <
class Entry>
760 template <
class Entry>
768 template <
class Entry>
777 std::
cerr <<
" *** ERROR *** (KKQueue::SwapIndexes) Indexes[" 801 template <
class Entry>
809 <<
"*** ERROR *** KKQueue<Entry>::operator[], Index [" <<
idx <<
"] out of bounds." <<
std::
endl kkuint32 FindTheKthElement(kkuint32 k, Functor pred)
std::vector< Entry * >::iterator iterator
void DeleteEntry(EntryPtr _entry)
std::vector< Entry * >::const_iterator const_iterator
EntryPtr IdxToPtr(kkuint32 idx) const
bool operator==(const KKQueue< Entry > &rightSide) const
Returns True if every entry in both containers point to the same elements.
virtual EntryPtr PopFromBack()
KKQueue & operator=(const KKQueue &q)
Assignment Operator.
EntryPtr BackOfQueue() const
unsigned __int32 kkuint32
virtual void AddQueue(const KKQueue &q)
Add the contents of a separate KKQueue container to this container.
virtual EntryPtr RemoveLast()
kkint32 LocateEntry(EntryConstPtr _entry) const
void SetIdxToPtr(kkuint32 _idx, Entry *_ptr)
virtual void Add(EntryPtr _entry)
void RandomizeOrder(RandomNumGenerator &randomVariable)
Randomizes the order of the vector.
A typed container class/template that keeps track of entries via pointers only.
virtual void PushOnBack(EntryPtr _entry)
virtual EntryPtr RemoveFirst()
void RandomizeOrder(kkint64 seed)
Represents one single random number generator.
EntryPtr LookAtBack() const
kkint32 QueueSize() const
virtual void AddFirst(EntryPtr _entry)
KKQueue(const KKQueue &q)
Copy Constructor creating new instance; including duplicating contents if owner set to true...
void RandomizeOrder()
Randomizes the order of the vector.
bool operator!=(const KKQueue< Entry > &rightSide) const
returns False if NOT every entry in both containers point to the same elements
virtual EntryPtr PopFromFront()
void DeleteEntry(kkuint32 _idx)
EntryPtr LookAtFront() const
kkint32 PtrToIdx(EntryConstPtr _entry) const
KKQueue(bool _owner=true)
EntryPtr GetFirst() const
virtual void PushOnFront(EntryPtr _entry)
KKQueue * DuplicateListAndContents() const
Creates a new container including duplicating the contents, which also makes the new instance the own...
virtual ~KKQueue()
Virtual destructor; if owns its contents will also call the destructor on each one entry that it cont...
Entry & operator[](kkuint32 i) const
EntryPtr FrontOfQueue() const
void SwapIndexes(size_t idx1, size_t idx2)
KKQueue(const KKQueue &q, bool _owner)
Constructor, similar to the Copy Constructor except that you can control whether it duplicates the co...