template<class Type> class List a simple class for a List.
| List () default constructor | |
| List (const List <Type>& ) copy constructor | |
| operator[] (const int i) const returns the $i$th element of the List, un-writable | |
| operator[] (const int ) returns the $i$th element of the List, writable | |
| normalize () normalize the List | |
| reset () reset the List elements to be zero | |
| length () returns the length of the List | |
| last () returns the last element of the List | |
| first () returns the first element of the List | |
| ToVect () copy the current List to a Vector | |
| ToVect (int m) copy the first $m$ elements to a Vector | |
| operator+= (const Type ) append an element to the current List | |
| operator+= (const List <Type>& list) append a List $list$ to the current List | |
| operator= (const List <Type>& ) assign the List $list$ to the current List | |
| operator== (const List <Type>& list ) check if the List $list$ is the same as the current list | |
| In (Type c) check if $c$ is one of the elements of the current list. Returns the position index if is in, otherwise, returns -1. | |
| ToList ( Vector <Type>& v) a friend function, assign the elements of $v$ to a List | |
| operator << (ostream& , const List <Type>& ) a friend function, stream output | |
| operator >> (istream& , List <Type>& ) a friend function, stream input |
| addvals (const int n , const Type* dv) add values to the List | |
| ensureSubs (const int i) check if i is a valid index |
This class was modified after the class DList from Martin Smith.
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling