A collection of useful functions operating on iterables
Project description
PyAoI (Python Algorithms on Iterables)
This project provides convenient functions to process iterables, it is inspired by the algorithm header from the C++ standard template library (STL for short).
Installation
pip install pyaoi
How to use
All functions live in the pyaoi
namespace, you can import it with import pyaoi
and then call the functions
like this: pyaio.all_of()
Implemented functions
The following list shows planned functions and whether they are implemented yet. Feel free to make a PR for a listed function's implementation. This list is subject to change at any time.
Click to expand!
Non-modifying sequence operations
-
all_of
-
any_of
-
none_of
-
for_each
-
for_each_n
-
count
-
count_if
-
mismatch
-
find
-
find_if
-
find_end
-
find_first_of
-
adjacent_find
-
search
-
search_n
-
copy_replace
-
copy_replace_if
-
copy_replace_if_not
-
copy_except
-
copy_except_if
-
copy_except_if_not
Modifying sequence operations
-
fill
-
fill_n
-
transform
-
transform_n
-
rotate_copy
-
shift_left
-
shift_right
-
random_shuffle
-
shuffle
-
sample
-
unique
-
unique_copy
Partitioning operations
-
is_partitioned
-
partition
-
partition_copy
-
stable_partition
-
partition_point
Sorting operations
-
is_sorted
-
is_sorted_until
-
partial_sort
-
partial_sort_copy
-
stable_sort
-
nth_element
Binary search operations (on sorted ranges)
-
lower_bound
-
upper_bound
-
binary_search
-
equal_range
Other operations on sorted ranges
- merge
- implace_merge
Set operations (on sorted ranges)
-
includes
-
set_difference
-
set_intersection
-
set_symmetric_difference
-
set_union
Heap operations
-
is_heap
-
is_heap_until
-
make_heap
-
push_heap
-
pop_heap
-
sort_heap
Minimum/maximum operations
-
max_index
-
min_index
-
minmax
-
minmax_index
-
clamp
Comparison operations
- lexicographical_compare
- lexicographical_compare_threeway
Permutation operations
-
is_permutation
-
next_permutation
-
prev_permutation
Contributing
First of all, thanks a lot for your contribution, any form of contribution is very welcome and appropriated!
Please familiarise yourself with this project's code of conduct and contribution guidelines.
Getting help
- Read the docs
- Get in touch with other contributors at gitter
- If you think you found a bug, or documentation could be improved, please open an issue
License
Copyright (C) 2020-2021 Jonas Muehlmann
The project is licensed under the terms of the MIT license, you can view it here.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyaoi-2.5.0.tar.gz
.
File metadata
- Download URL: pyaoi-2.5.0.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fe950917cb7bbcb7be8c129d36b354a6862275718c2be66e0d2bfbf064cac49 |
|
MD5 | 4934f4fea8fb7b6125d0c8a8f3429c58 |
|
BLAKE2b-256 | ea5139504ca56aa494792d70e884274ff30824f8cf1fbf54d7967661a46531c3 |
File details
Details for the file pyaoi-2.5.0-py3-none-any.whl
.
File metadata
- Download URL: pyaoi-2.5.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb35d6b88504b881b7cb575200531990992688c373a9c78398cf790313a308a8 |
|
MD5 | 96b7d95d9829e48bb794a35a71881ad1 |
|
BLAKE2b-256 | 378b232e785a95dbd34bc8241fee144d6a005884c0ad98d264194e2c9485a98d |