Definition
An instance L of the parameterized data type slist<E> is a sequence of items (slist<E>::item). Each item in L contains an element of data type E, called the element or value type of L. The number of items in L is called the length of L. If L has length zero it is called the empty list. In the sequel < x > is used to denote a list item containing the element x and L[i] is used to denote the contents of list item i in L.
#include < LEDA/core/slist.h >
Types
slist<E>::item | the item type. |
slist<E>::value_type | the value type. |
Creation
slist<E> | L | creates an instance L of type slist<E> and initializes it to the empty list. |
slist<E> | L(const E& x) | creates an instance L of type slist<E> and initializes it to the one-element list < x >. |
slist<E> | L(const std::initializer_list<E>& lst) | |
creates an instance L of type slist<E> and initializes it to a copy of lst, e.g. list < int > L(1, 2, 3, 4, 5) |
Operations