NeTrainSim 0.1.1 beta
The Open-Source Network Trains Simulator
 
Loading...
Searching...
No Matches
list.h
Go to the documentation of this file.
1
6#ifndef LIST_H
7#define LIST_H
8
9#include <iostream>
10#include <list>
11#include <algorithm>
12
21template <typename T>
22class List : public std::list<T> {
23public:
25 using std::list<T>::list;
26
35 typename std::list<T>::iterator argmin() {
36 return std::min_element(this->begin(), this->end());
37 }
38
47 typename std::list<T>::iterator argmax() {
48 return std::max_element(this->begin(), this->end());
49 }
50};
51
52#endif // LIST_H
A list.
Definition list.h:22
std::list< T >::iterator argmin()
Gets the argmin.
Definition list.h:35
std::list< T >::iterator argmax()
Gets the argmax.
Definition list.h:47