#include <ListUtils.h>
Static Public Methods | |
| template<class T> void | reverse (List< T > &lst) |
| Reverse the order of elements in a list (in-place). | |
| template<class T> int | findFirstNotOf (const List< T > &lst, const T &value) throw (InvalidArgumentException&) |
| Finds the first element form the list which is not same as given value. | |
| template<class T> List< T > | selectRandomly (const List< T > &lst, int n) throw (InvalidArgumentException&) |
| Randomly select n items from a list. | |
| template<class T> List< List< T > > | splitRandomly (const List< T > &lst, int n) throw (InvalidArgumentException&) |
| Randomly split lst into two pieces containing n and size-n items, respectively. | |
| template<class T> int | maxIndex (const List< T > &lst) throw (InvalidArgumentException&) |
| Finds the index of maximum value of the list. | |
| template<class T> int | minIndex (const List< T > &lst) throw (InvalidArgumentException&) |
| Finds the index of minimum value of the list. | |
| List< std::string > | createList (int argc, char *const *argv) |
| Create a list of strings out of an array of char pointers. | |
|
||||||||||||
|
Create a list of strings out of an array of char pointers. This method is useful for example in parsing command-line arguments.
|
|
||||||||||||||||
|
Finds the first element form the list which is not same as given value.
|