#include <digraphx/map_adapter.hpp>
template<typename Container>
MapAdapter class
Dict-like data structure by std::vector and Range.
Base classes
-
template<typename Container>class MapAdapterBase<Container>
- Dict-like data structure by std::vector and Range.
Public types
- using key_type = size_t
- using mapped_type = typename Container::value_type
-
using value_type = std::pair<key_
type, mapped_ type> - using Base = MapAdapterBase<Container>
-
using E = decltype(py::enumerate(Base::
_lst))
Constructors, destructors, conversion operators
- MapAdapter(Container& lst) explicit
Public functions
Function documentation
template<typename Container>
MapAdapter<Container>:: MapAdapter(Container& lst) explicit
Parameters | |
---|---|
lst in | The lst parameter is a reference to a container object. |
The function constructs a new MapAdapter object with a given container and creates a mapview using py::enumerate.
template<typename Container>
auto MapAdapter<Container>:: end() const
Returns | The end iterator of the mapview. |
---|
The function returns an iterator pointing to the end of the mapview.