You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Although currently the project has been properly verified using only the G++ and Clang compilers it should work fine with other compilers with C++23 support like MSVC.
@@ -31,17 +38,34 @@ Designed strictly around modern C++ paradigms, the library heavily leverages tem
31
38
32
39
To accommodate different mathematical models without compromising API clarity or performance, the library is strictly partitioned into two primary modules:
33
40
34
-
-**GL (Graph Library):** The core module dedicated to standard graphs. It handles both directed and undirected topologies where edges represent connections between two vertices. It provides a comprehensive suite of utilities including structural generators, graph modifiers, and a broad spectrum of classical graph algorithms.
35
-
-**HGL (Hypergraph Library):** A specialized module dedicated to hypergraphs, where a single hyperedge represent higher-order connections. It features generalized traversal algorithms and incidence-based memory models tailored for complex, multi-way relationships.
41
+
-**GL (Graph Library):** The core module dedicated to standard graphs. It handles both directed and undirected topologies where edges represent connections between exactly two vertices. It provides a comprehensive suite of utilities including structural generators, graph modifiers, and a broad spectrum of classical graph algorithms.
42
+
-**HGL (Hypergraph Library):** A specialized module dedicated to hypergraphs, where a single hyperedge represents a higher-order connection between an arbitrary number of vertices. It features generalized traversal algorithms and incidence-based memory models tailored for complex, multi-way relationships.
43
+
44
+
---
36
45
37
-
## GL: Core Features
46
+
## Core Features
38
47
39
-
-**Unified API:** The `gl::graph` class offers a single, consistent interface that completely abstracts away the underlying data structures. Users can seamlessly swap between different backend representations without needing to rewrite any of their traversal logic, property accesses, or algorithm calls.
40
-
-**Flexible Memory Layouts:** The library provides a comprehensive suite of memory-efficient representations tailored to different graph types and access patterns. Users can choose between standard container-based layouts (Adjacency Lists and Matrices) and highly optimized, cache-friendly contiguous array structures (Flat Lists and Flat Matrices).
41
-
-**Customizable Element Properties:** Vertices and edges can carry arbitrary, user-defined payloads. Whether you are assigning standard metric weights and colors or attaching complex, application-specific data structures, the library's traits system ensures that property injection and access remain strictly type-safe and performant.
42
-
-**Zero-Cost Abstractions:** By relying on C++20 concepts instead of virtual interfaces and dynamic dispatch, CPP-GL eliminates vtable overhead while enforcing strict compile-time contracts.
43
-
-**Extensible Engines & Concrete Algorithms:** CPP-GL features a dual-layered algorithmic architecture. At its core, it provides highly generic search templates (such as BFS, DFS and Priority-First Search) that act as foundational engines, allowing users to build entirely new algorithms by injecting custom callbacks. Built upon these engines is a robust suite of concrete, ready-to-use algorithms for immediate application.
44
-
-**Robust I/O Facilities:** Built-in serialization and formatting tools allow for seamless translation of in-memory graphs to and from standard streams and files, utilizing a shared global state for consistent formatting.
48
+
Because both modules share the same fundamental design philosophy, they offer a unified, symmetrical feature set tailored to their respective mathematical domains:
49
+
50
+
-**Shared Zero-Cost Infrastructure:** By relying on C++20 concepts instead of virtual interfaces and dynamic dispatch, CPP-GL eliminates vtable overhead while enforcing strict compile-time contracts. Crucially, the **HGL module is built strictly on top of the GL module**, directly reusing its core infrastructure (ID types, traits, memory structures) to ensure maximum code reuse, while allowing the GL module to remain completely standalone for standard graph use cases.
51
+
-**Unified Topology APIs:** The `gl::graph` and `hgl::hypergraph` classes offer consistent interfaces that completely abstract away the underlying memory models. Users can seamlessly swap between different backend representations without rewriting their traversal logic, property accesses, or algorithm calls.
52
+
-**Flexible Memory Layouts:** The library provides a comprehensive suite of memory-efficient representations. Users can choose between dynamic container-based layouts (Lists and Matrices) and highly optimized, cache-friendly contiguous array structures (Flat Lists and Flat Matrices). The HGL module further extends this by allowing users to specify the orientation of the memory models to optimize generalized incidence queries.
53
+
-**Customizable Element Properties:** Vertices, edges, and hyperedges can carry arbitrary, user-defined payloads. Whether you are assigning standard metric weights and colors or attaching complex, application-specific data structures, the library's traits system ensures that property injection and access remain strictly type-safe and performant.
54
+
-**Dual-Layered Algorithmic Architecture:** CPP-GL cleanly separates traversal mechanics from specific problem-solving logic. At the foundation, highly generic search engines (like BFS and DFS) empower users to construct completely custom algorithms via injected callbacks. Layered seamlessly above this is a comprehensive suite of ready-to-use concrete algorithms, ranging from standard graph pathfinding to specialized hypergraph reachability (such as B-Searches and F-Searches).
55
+
-**Robust I/O Facilities:** Native serialization and formatting tools make it simple to pipe topologies directly to and from standard C++ streams and files. Both the GL and HGL modules share a unified set of stream options for visual output, while relying on dedicated, easily parsable flat-text formats (GSF and HGSF) to ensure fast and predictable data serialization.
56
+
57
+
---
58
+
59
+
## Compiler support
60
+
61
+
| Compiler | Min version |
62
+
| :-: | :-: |
63
+
| GNU G++ | 14 |
64
+
| Clang | 18 |
65
+
66
+
> [!NOTE] C++23 Support
67
+
>
68
+
> Although currently the project has been properly verified using only the G++ and Clang compilers it should work fine with other compilers with C++23 support like MSVC.
If you have already downloaded or installed the library locally, you can add the <cpp-gl-root>/include path to your system and link it using `find_package`:
1. Specify the desired version tag, branch, or specific commit
105
+
2. The CPP-GL library requires C++23
90
106
91
-
### Option C: Including the Headers Directly
107
+
### Option B: Including the Headers Directly
92
108
93
109
If you do not wish to use CMake, you can simply download the desired version of the library from the [Releases Page](https://github.com/SpectraL519/cpp-gl/releases) and add the `include` directory of the library to your project via the `-I<cpp-gl-dir>/include` flag.
94
110
@@ -99,4 +115,4 @@ If you do not wish to use CMake, you can simply download the desired version of
99
115
Ready to write some code? Choose a module below to view its Quick Start guide and dive into the tutorials:
100
116
101
117
*[**Get Started with GL (Standard Graphs)**](gl/quick_start.md) - Master the core concepts, build custom topologies, and explore the robust suite of generic traversal engines and classical algorithms.
102
-
***Get Started with HGL (Hypergraphs)** - *(Coming Soon)*
118
+
*[**Get Started with HGL (Hypergraphs)**](hgl/quick_start.md) - Master generalized incidence, configure complex memory layouts, and evaluate higher-order reachability across hypergraph networks.
0 commit comments