AegisGraph: High-Performance Graph Library in plain C++ for Python

π Introduction
AegisGraph is a high-performance graph library written in C++ with Python bindings. It is designed to provide a fast and efficient alternative to popular graph libraries such as:
- NetworkX β Graph analysis library in Python.
- PyG (PyTorch Geometric) β Deep learning framework for graph-based learning.
AegisGraph focuses on hardware efficiency, memory optimization, and security, offering superior speed and scalability in graph operations.
π― Why Choose AegisGraph?
π₯ Key Advantages
- Adjacency List Representation:
Optimized graph storage that enhances memory efficiency and query speed compared to sparse matrix representations.
- C++ Backend for Maximum Performance:
Core operations are implemented in C++ with minimal overhead, ensuring faster graph processing.
- Secure and Efficient Random Walks:
Utilizes Pseudorandom Number Generators (PRNGs) instead of Pythonβs random.choice() for secure and reproducible random walks.
- Optimized RAM Usage:
Memory-efficient graph loading and neighbor queries for handling large-scale graphs.
- No PyTorch Dependency:
Lightweight deployment without heavy dependencies, making it ideal for various environments.
β‘ Core Features
- π‘ Graph Construction: Supports directed, undirected, and weighted graphs.
- π Random Walks with PRNG: Secure and hardware-efficient random walk implementation.
- πΈοΈ Graph Algorithms: Supports BFS, DFS, Dijkstraβs, and other common algorithms.
- π§ Fast Neighbor Queries: Constant-time neighbor access through adjacency lists.
- π Graph Serialization: Save and load graphs efficiently.
π οΈ Installation
π¦ Prerequisites
- C++ Compiler: GCC, Clang, or MSVC supporting C++17 or later.
- Python (Optional for Bindings): Version 3.10 or higher.
- CMake: For building the library.
βοΈ Building from Source
1. Clone the Repository
git clone https://github.com/your-username/aegisgraph.git
cd aegisgraph
mkdir build
cd build
cmake ..
make
2. Install the Python Bindings
π Python Usage
import aegisgraph
graph = aegisgraph.Graph()
graph.add_edge(0, 1)
graph.add_edge(1, 2)
graph.add_edge(2, 3)
graph.add_edge(3, 0)
graph.getNeighbor(1)
path = graph.random_walk(0, 10)
print(f"Random walk path: {path}")
Install with pip
python3 -m venv .aegisgraph-env
source .aegisgraph-env/bin/activate
pip install --upgrade pip build
pip install -e .
π Graph Loading Speed AegisGraph achieves a 3x speed improvement in loading large-scale graphs compared to NetworkX.
π API Documentation π Graph Class
- addEdge(int u, int v, double weight = 1.0) β Add an edge between nodes.
- getNeighbors(int node) β Retrieve neighbors of a node.
- randomWalk(int start, int steps) β Perform a random walk starting from a node.
π Utility Functions
- loadGraph(string filename) β Load graph from a file.
- saveGraph(string filename) β Save graph to a file.
π Reporting Issues To report a bug or request a feature, please open an issue
π« Contact For questions, suggestions, or contributions, reach out via:
π§ Email: ldani.nosp@m.elfc.nosp@m.h@gma.nosp@m.il.c.nosp@m.om
π GitHub: TheRadDani
π View Full API Documentation (HTML)
π Citation
If you use AegisGraph in academic work, please cite it as:
```bibtex @misc{aegisgraph_2025, author = {Daniel F. C.}, title = {AegisGraph: High-Performance Graph Library in plain C++ for Python}, year = {2025}, howpublished = {\url{https://github.com/TheRadDani/aegisgraph}}, note = {Software library for efficient graph processing} }