py namespace
Namespaces
- namespace detail
Classes
- class AtlasView
- class dict
-
template<typename Graph>class EdgeView
-
template<typename _Graph>class GrAdaptor
-
template<typename Iter>struct key_iterator
- class Lict
- Dict-like data structure by std::vector and Range.
- struct Range
- Range.
- struct RangeIterator
- class set
-
template<typename Graph>class VertexView
Functions
-
template<typename Key, typename T>auto operator<(const Key& key, const dict<Key, T>& m) -> bool -> auto
-
template<typename Key, typename T>auto len(const dict<Key, T>& m) -> size_t -> auto
-
template<typename T>auto enumerate(T& iterable) -> detail::EnumerateIterableWrapper< T > -> auto
- enumerate(T &iterable)
-
template<typename T>auto const_enumerate(const T& iterable) -> detail::EnumerateIterableWrapper< const T > -> auto
- const_
enumerate(const T &iterable) -
template<typename T>auto range(T start, T stop) -> Range< T > -> CONSTEXPR14 auto
- range(T start, T stop)
-
template<typename T>auto range(T stop) -> Range< T > -> CONSTEXPR14 auto
- range(T stop)
-
template<typename Key>auto operator<(const Key& key, const set<Key>& m) -> bool -> auto
-
template<typename Key>auto len(const set<Key>& m) -> size_t -> auto
Function documentation
#include <py2cpp/enumerate.hpp>
template<typename T>
auto py:: enumerate(T& iterable) -> detail::EnumerateIterableWrapper< T >
Template parameters | |
---|---|
T | |
Parameters | |
iterable in | |
Returns | detail::EnumerateIterableWrapper<T> |
The enumerate(T &iterable)
function is a utility function that allows you to iterate over a container or range and also get the index of each element in the iteration. It returns an instance of the detail::
class, which provides a range-based for loop compatible interface.
#include <py2cpp/enumerate.hpp>
template<typename T>
auto py:: const_enumerate(const T& iterable) -> detail::EnumerateIterableWrapper< const T >
const_
Template parameters | |
---|---|
T | |
Parameters | |
iterable in | |
Returns | detail::EnumerateIterableWrapper<const T> |
The const_enumerate(const T &iterable)
function is a utility function that allows you to iterate over a constant container or range and also get the index of each element in the iteration. It returns an instance of the detail::
class, which provides a range-based for loop compatible interface. This function is useful when you want to iterate over a constant container without modifying its elements.
#include <py2cpp/range.hpp>
template<typename T>
CONSTEXPR14 auto py:: range(T start,
T stop) -> Range< T >
Template parameters | |
---|---|
T | |
Parameters | |
start in | |
stop in | |
Returns | Range<T> |
The range(T start, T stop)
function is creating a range of values from start
to stop
. It returns a Range<T>
object that represents the range. The range includes all values from start
up to, but not including, stop
.
#include <py2cpp/range.hpp>
template<typename T>
CONSTEXPR14 auto py:: range(T stop) -> Range< T >
Template parameters | |
---|---|
T | |
Parameters | |
stop in | |
Returns | Range<T> |
The range(T stop)
function is creating a range of values from 0 to stop
. It returns a Range<T>
object that represents the range. The range includes all values from 0 up to, but not including, stop
.