Introduction Nikita Agarwal
GraphX Library is a aimed to build a comprehensive C++ Library which allows you to solve graph based problems out of the box. It handles various complexities and enables you to solve problems in nearly all kinds!
Solving graph problems becomes very🗲fast since learning to use this library has an easy learning curve.
Note
The library was originally built to support classes taken by Manas sir, but you can ofcourse use it for your purposes like solving problems at Codeforces, Codechef, Leetcode, etc at your own risk.

GraphX Library Code
You can directly copy paste following code above main function in your C++ code. Link: GraphX Library
Features
✔️ Supports 1D, 2D, 3D Graphs | ✔️ Algorithms as blackbox (BFS, Dijkstra, etc) |
✔️ Weighted/Unweighted Graphs | ✔️ Directed/Undirected Graphs |
✔️ Handling Grid Graphs | ✔️ Integrated Graph Visualizer (WIP) |
✔️ Advanced Graph Layering & Modelling support | ✔️ Above all, an easy learning curve! |
Design Philosphy
GraphX library has been designed keeping ease of learning as topmost priority. As a result, we have modelled a role division between what should Library do (Abstract out algorithms, tedious implementations, effeciency, memory management) and what should library-user (which is to just focus on building graphs using nodes & edges). This not only makes the library very easy to use but also provides great clarity and speed to programmer using the library.
Next priority has been given to depth coverage of what you can do with the library: can it handle grids? does it seamlessly supports graph modelling or 2D/3D versions of nodes? etc. After this preference has been given to speed of execution of library itself and to low level design of library itself. In upcoming v2, v3 releases we intend to make it even faster and improved LLD.
Key Takeaway
Its important to keep in mind how the library intends to provide wings to user, clear distinction between:-
- Responsibility of Library: Abstract out algorithms, tedious implementations, effeciency, memory management
- Responsibility of Programmer: which is to just focus on building graphs using nodes & edges
How to use this Documentation?
You should be independently be able to navigate and read each section in isolation. Below is however guide to help you effeciently use this Documentation:-
Steps to use this Documentation effeciently:
1. Design Philosphy | You should definitely start by reading Key Takeaways section in Design Philosphy |
---|---|
2. Pre-Requisite | Optional if you aren't comforatable with vectors or classes in C++ then read, else skip |
3. Functions | Read building-Graph BFS section in that order, it will teach you how to use this library |
4. Solve Problems | Read Shortest-Path Shortest-path-in-grid sections to learn how to apply library end-to-end |