libpcds (library For Python With Cool Data Structures And Algorithms) is a versatile C++ template library designed for fast and efficient implementation of various data structures and algorithms, readily usable in Python.
Warning
This software is unfinished. Keep your expectations low.
libpcds is a multipurpose library containing a diverse array of algorithms and data structures aimed at extending Python's capabilities. The library includes:
- Reimplementations for Fun: Some classic algorithms and data structures are re-implemented in C++ as an academic exercise, offering insights into their inner workings.
- New Innovations: The library also introduces new algorithms and data structures, some of which are unique explorations by the author.
- C++ Compiler (e.g., g++)
- Python (Version 3.x)
- pybind11
-
Clone the Repository:
git clone https://github.com/Birkenpapier/libpcds.git cd libpcds
-
Compile the C++ Code: Replace
your_code_file.cpp
with the actual C++ source file name.c++ -O3 -Wall -shared -std=c++11 -fPIC `python3 -m pybind11 --includes` your_code_file.cpp -o your_output_module`python3-config --extension-suffix`
-
Using the Library in Python: After compilation, you can import and use the module in your Python scripts.
import your_output_module
- Further documentation and usage examples will be provided as the library develops.
Contributions to libpcds are welcome! Whether it's adding new features, improving existing ones, or reporting bugs, your input is valuable. Please feel free to open issues or pull requests on the repository.
-
Breadth-First Search (BFS)
-
Depth-First Search (DFS)
-
Quick Sort
-
Merge Sort
-
Bellman-Ford Algorithm
-
Permutations and Combinations
-
Prim's Algorithm
-
Kruskal's Algorithm
-
Bucket Sort
-
Radix Sort
-
Linked List
-
Doubly Linked List
-
Circular Queue
-
Priority Queue
-
AVL Tree
-
Red-Black Tree
-
B-Tree
-
B+ Tree
-
Union-Find
-
Trie (Prefix Tree)