![]() |
AlgoPlus v0.1.0
|
circular linked list class More...
#include <circular_linked_list.h>
Classes | |
class | Iterator |
Iterator class. More... | |
Public Member Functions | |
circular_linked_list (std::vector< T > _elements={}) noexcept | |
Construct a new circular linked list object. | |
circular_linked_list (const circular_linked_list &c) | |
copy constructor for the circular linked list class | |
circular_linked_list & | operator= (const circular_linked_list &c) |
operator = for circular linked list class | |
bool | empty () |
empty function | |
size_t | size () |
size function | |
Iterator | begin () |
pointer that points to begin | |
Iterator | end () |
pointer that points to end | |
void | push_back (T key) |
push_back function | |
void | push_front (T key) |
push_front function | |
void | erase (T key) |
erase function | |
bool | search (T key) |
search function | |
std::vector< T > | elements () |
elements function | |
void | visualize () |
visualize function returns a .dot file that can be previewd with graphviz plugin in vscode | |
Friends | |
std::ostream & | operator<< (std::ostream &out, circular_linked_list< T > &l1) |
<< operator for the circular list class | |
circular linked list class
|
inlineexplicitnoexcept |
Construct a new circular linked list object.
__elements | vector<T> so you dont have to do multiple insertions |
|
inlineexplicit |
copy constructor for the circular linked list class
c | the list we want to copy |
|
inline |
pointer that points to begin
|
inline |
elements function
|
inline |
empty function
|
inline |
pointer that points to end
|
inline |
erase function
key | the key to be erased |
|
inline |
operator = for circular linked list class
c | the list we want to copy |
|
inline |
push_back function
key | the key to be inserted |
|
inline |
push_front function
key | the key to be inserted |
|
inline |
search function
key | the key to be searched |
|
inline |
size function