Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <range.h>
Public Types | |
using | iterator = IteratorT |
using | const_iterator = IteratorT |
using | value_type = typename std::iterator_traits<IteratorT>::value_type |
Public Member Functions | |
iterator_range () | |
iterator_range (IteratorT begin_iterator, IteratorT end_iterator) | |
IteratorT | begin () const |
IteratorT | end () const |
template<class It = IteratorT> | |
std::enable_if< std::is_base_of< std::random_access_iterator_tag, typenamestd::iterator_traits< It >::iterator_category >::value, size_t >::type | size () const |
bool | empty () const |
A range adaptor for a pair of iterators.
This just wraps two iterators into a range-compatible interface. Nothing fancy at all.
using operations_research::math_opt::iterator_range< IteratorT >::const_iterator = IteratorT |
using operations_research::math_opt::iterator_range< IteratorT >::iterator = IteratorT |
using operations_research::math_opt::iterator_range< IteratorT >::value_type = typename std::iterator_traits<IteratorT>::value_type |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns the size of the wrapped range. Does not participate in overload resolution for non-random-access iterators, since in those cases this is a slow operation (it must walk the entire range and maintain a count).
Users who need to know the "size" of a non-random-access iterator_range should pass the range to absl::c_distance()
instead.