|
Py2Cpp 1.6.3; VERSION ${PROJECT_VERSION}
|
Python-like utilities and data structures for C++. More...
Namespaces | |
| namespace | detail |
Classes | |
| class | AtlasView |
| Atlas view for vertex adjacency in Boost Graph Library graphs. More... | |
| class | dict |
| Python-like dictionary implementation. More... | |
| class | EdgeView |
| Edge view for Boost Graph Library graphs. More... | |
| class | Generator |
| Minimal generator using C++20 coroutines. More... | |
| class | GrAdaptor |
| Graph adapter for Boost Graph Library integration. More... | |
| struct | key_iterator |
| Iterator adapter for accessing keys in map-like containers. More... | |
| struct | Range |
| Python-like range implementation. More... | |
| struct | RangeIterator |
| Iterator for range-based sequences. More... | |
| class | RecursiveGenerator |
| Recursive generator using C++20 coroutines with symmetric transfer. More... | |
| class | set |
| Python-like set implementation. More... | |
| class | VertexView |
| Vertex view for Boost Graph Library graphs. More... | |
Functions | |
| template<typename Key , typename T > | |
| auto | operator< (const Key &key, const dict< Key, T > &m) noexcept -> bool |
| Check if a key is contained in a dictionary. | |
| template<typename Key , typename T > | |
| auto | len (const dict< Key, T > &m) noexcept -> size_t |
| Get the number of key-value pairs in a dictionary. | |
| template<typename T > | |
| auto | enumerate (T &iterable) -> detail::EnumerateIterableWrapper< T > |
| Create an enumerable wrapper for a container. | |
| template<typename T > | |
| auto | enumerate (const T &iterable) -> detail::EnumerateIterableWrapper< const T > |
| Create an enumerable wrapper for a const container. | |
| template<typename T > | |
| auto | const_enumerate (const T &iterable) -> detail::EnumerateIterableWrapper< const T > |
| (deprecated) Create an enumerable wrapper for a const container | |
| template<typename T > | |
| CONSTEXPR14 auto | range (T start, T stop) -> Range< T > |
| range(T start, T stop) | |
| template<typename T > | |
| CONSTEXPR14 auto | range (T stop) -> Range< T > |
| range(T stop) | |
| template<typename T > | |
| void | swap (RecursiveGenerator< T > &a, RecursiveGenerator< T > &b) noexcept |
| template<typename Key > | |
| auto | operator< (const Key &key, const set< Key > &m) -> bool |
| Check if an element is contained in a set. | |
| template<typename Key > | |
| auto | len (const set< Key > &m) noexcept -> size_t |
| Get the number of elements in a set. | |
Python-like utilities and data structures for C++.
The py namespace contains implementations of Python-inspired data structures and utilities that make C++ programming more convenient and Python-like.
|
inline |
(deprecated) Create an enumerable wrapper for a const container
| T | The container type |
| [in] | iterable | Const reference to the container to enumerate |
|
inline |
Create an enumerable wrapper for a const container.
Returns a wrapper that allows iteration over container elements with their indices, similar to Python's enumerate() function. Used for const containers.
| T | The container type |
| [in] | iterable | Const reference to the container to enumerate |
|
inline |
Create an enumerable wrapper for a container.
Returns a wrapper that allows iteration over container elements with their indices, similar to Python's enumerate() function.
| T | The container type |
| [in] | iterable | Reference to the container to enumerate |
|
inlinenoexcept |
Get the number of key-value pairs in a dictionary.
| Key | The key type |
| T | The value type |
| [in] | m | The dictionary |
|
inlinenoexcept |
Get the number of elements in a set.
| Key | The element type stored in the set |
| [in] | m | The set |
|
inlinenoexcept |
Check if a key is contained in a dictionary.
| Key | The key type |
| T | The value type |
| [in] | key | The key to check |
| [in] | m | The dictionary to search |
|
inline |
Check if an element is contained in a set.
| Key | The element type stored in the set |
| [in] | key | The element to check |
| [in] | m | The set to search |
| CONSTEXPR14 auto py::range | ( | T | start, |
| T | stop | ||
| ) | -> 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.
| T | The numeric type for the range values |
| [in] | start | The starting value of the range (inclusive) |
| [in] | stop | The ending value of the range (exclusive) |
| CONSTEXPR14 auto py::range | ( | T | stop | ) | -> 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.
| T | The numeric type for the range values |
| [in] | stop | The ending value of the range (exclusive) |
|
noexcept |