![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
#include <views.h>
Classes | |
struct | TransformViewIterator |
Public Types | |
using | value_type = const ValueT |
using | value_iterator = typename absl::Span<value_type>::iterator |
Public Member Functions | |
TransformView ()=default | |
template<typename ValueRangeT> | |
TransformView (const ValueRangeT *values) | |
auto | size () const |
bool | empty () const |
decltype(auto) | operator[] (IndexT index) const |
TransformViewIterator | begin () const |
TransformViewIterator | end () const |
absl::Span< value_type > | base () const |
View applying stateless transformation to the values of a continugous container. Looping over this view is equivalent to:
for (IndexT i(0); i < IndexT(container.size()); ++i) { your_code(ValueTransformT()(values_[static_cast<size_t>(i)])); }
using util_intops::TransformView< ValueT, IndexT, ValueTransformT >::value_iterator = typename absl::Span<value_type>::iterator |
using util_intops::TransformView< ValueT, IndexT, ValueTransformT >::value_type = const ValueT |
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |