個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證A general-purpose lightweight C++ graph library
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
Graphs without the manual.
Designed as a lightweight , easy to use , and header-only C++ graph library which doesn't sacrifice on performance.
Try without installing? Give Graaf a spin on Compiler Explorer !
About
Graph is an abstract data type that is widely used in computer science. It is a collection of vertices (nodes) and edges
that connect these vertices. Graphs are used to model many real-world problems, such as social networks, road networks,
and computer networks. As such, graph algorithms are used in many applications, including route planning, network
analysis, and data mining.檢視完整 README ↗Graph is an abstract data type that is widely used in computer science. It is a collection of vertices (nodes) and edges that connect these vertices. Graphs are used to model many real-world problems, such as social networks, road networks, and computer networks. As such, graph algorithms are used in many applications, including route planning, network analysis, and data mining.
Graaf: A Lightweight, Header-Only C++20 Graph Library
Key Features:
Purpose: Graaf is designed with the goal of simplifying graph-related tasks. It offers a lightweight alternative to the Boost Graph Library (BGL) and is built for simplicity and extensibility. With Graaf, you can easily create, manipulate, and analyze graphs, making it suitable for a wide range of applications.
The most straightforward way to use the Graaf in your project is to include it as a header-only library. Please take a look at the installation guide for alternative installation methods.
The Graaf library can be included as a header-only library. All it requires is a compiler with C++ 20 support.
Download the header-only library from our release page and add
the include/graaflib directory to your include path. You can now use Graaf in your source files:
// main.cpp
#include <graaflib/directed_graph>
For more details or alternative installation methods, see the installation guide.
Using the Graaf library is easy! Specializations are provided for a directed_graph as well as for undirected_graph.
To create your first graph:
undirected_graph<int, float> my_graph{};
This creates an undirected graph with integer values on the vertices and float weights on the edges. Graaf is
designed with generality in mind. As such, it can be used to store any user-defined vertex and edge class:
struct User {
std::string name;
int age;
};
// An edge type can also be unweighted if we don't derive from weighted_edge
struct Connection : public weighted_edge<float> {
float strength;
float get_weight() const override { return strength; }
};
undirected_graph<User, Connection> my_graph{};
Implementations for common graph algorithms are provided under the algorithm namespace. Combining this
with built-in dot format support allows us to do things like visualizing the shortest path between two vertices:
To get started, take a look at our quickstart guide.
Algorithms implemented in the Graaf library include the following. For more information on individual algorithms please take a look at the docs.
The Graaf library welcomes contributions 🎊
If you're interested in improving, fixing bugs, or adding features, please refer to the development docs for guidelines and have your development environment set up before you start. Check out our roadmap on YouTrack to stay up to date on planned features and improvements. We also have an issue tracker for bug reports and feature requests.
Feel free to join our Discord for assistance and a smooth contribution experience.
This project is licensed under the MIT license.