| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
The complete, versioned documentation, including detailed tutorials, quick start guides, and architectural overviews, is hosted online:
Explore the CPP-GL Documentation
CPP-GL is a highly customizable, intuitive, and concept-driven graph and hypergraph library designed for modern C++ standards.
Designed strictly around modern C++ paradigms, the library heavily leverages templates and concepts to deliver an API that is exceptionally fast, generic, and type-safe. It relies solely on the C++ standard library, meaning it requires no external dependencies and integrates perfectly with modern C++ tools such as range-based loops, the <ranges> library, standard algorithms, stream operations, and more.
To accommodate different mathematical models without compromising API clarity or performance, the library is strictly partitioned into two primary modules:
Because both modules share the same fundamental design philosophy, they offer a unified, symmetrical feature set tailored to their respective mathematical domains:
| Compiler | Min version |
|---|---|
| GNU G++ | 14 |
| Clang | 18 |
Note
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.
CPP-GL is a header-only template library. It can be integrated into a project either by directly including the headers or via CMake.
The easiest way to integrate CPP-GL is to fetch it directly from the GitHub repository during the CMake configuration phase:
cmake_minimum_required(VERSION 3.14)
project(my_project LANGUAGES CXX)
include(FetchContent)
FetchContent_Declare(
cpp-gl
GIT_REPOSITORY [https://github.com/SpectraL519/cpp-gl.git](https://github.com/SpectraL519/cpp-gl.git)
GIT_TAG <tag> # Specify the desired version tag, branch, or specific commit.
)
FetchContent_MakeAvailable(cpp-gl)
add_executable(my_project main.cpp)
set_target_properties(my_project PROPERTIES
CXX_STANDARD 23 # The CPP-GL library requires C++23.
CXX_STANDARD_REQUIRED YES
)
target_link_libraries(my_project PRIVATE cpp-gl)If CMake is not being used, simply download the desired version of the library from the Releases Page and add the include directory of the library to the project via the -I<cpp-gl-dir>/include flag.
Performance and zero-cost abstraction are primary goals of this library. A comprehensive evaluation suite built on top of Google Benchmark provides a structured way to measure, filter, and report the library's performance across various graph algorithms and memory layouts.
For detailed performance metrics, configuration instructions (including BGL integration), and CLI usage, please refer to the Benchmarks Guide.
To build the testing and documentation suites locally, follow the guides below.
The library features a comprehensive test suite powered by Doctest and orchestrated via CMake. The test executables for both the gl and hgl modules can be built and run as follows:
# Configure the project with tests enabled
cmake -B build -DBUILD_TESTS=ON
# Build the test executables (replace <n> with the core count)
cmake --build build/ -j<n>
# Execute the tests
./build/tests/gl
./build/tests/hglThe project enforces strict code formatting using clang-format-18. A custom Python script is provided to streamline the formatting process across the repository.
To format the entire repository:
python scripts/format.py -exe clang-format-18To format only the files modified in the last commit:
python scripts/format.py -m -exe clang-format-18Note
If clang-format-18 is your system's default, you can omit the -exe flag.
The documentation build process utilizes the following toolchain:
To build and serve the documentation locally:
make serve-docsTo clean the documentation build directories:
make clean-docsNote
The documentation build scripts rely on uv to simplify Python dependency management within the project. Ensure uv is installed on the system before attempting to build the documentation.
The CPP-GL project uses the MIT License which can be found in the LICENSE file.
| Back | FazBrowse Home | New Git URL |