aegisgraph
A high-performance, secure C++ graph library using adjacency lists
Loading...
Searching...
No Matches
aegisgraph

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

DOI

aegrisgraph_logo

πŸ“š 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
# Create a graph instance
graph = aegisgraph.Graph()
# Add edges
graph.add_edge(0, 1)
graph.add_edge(1, 2)
graph.add_edge(2, 3)
graph.add_edge(3, 0)
graph.getNeighbor(1)
# Perform a random walk
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} }