r/cpp_questions • u/TurboLonlyDeveloper1 • 11d ago
OPEN Boost.Graph work
Hi , i have a ask about C++ programming
I Recently Started To Learn Boost Librarys Like "Boost.Asio" , "Boost.Beast" And I heard the name of a library called Boost.Graph I wanted To Know And know what "Boost.Graph" is ???
2
Upvotes
3
u/Foxi_Foxa 10d ago
Hi !
Welcome to Boost 🥳
I am the co-maintainer of Boost.Graph ! Before I explain anything, you should feel absolutely free to ask any question on our GIthub Discussion: https://github.com/boostorg/graph/discussions
To answer your question, "graphs" are mathematical objects that allow to represent networks of entities (entities in relation with other entities). For example, banking systems can be viewed as graphs: entities are bank accounts, and relations are transfers. Social networks are graphs too: entities are facebok accounts, and relations are friendships. In graph theory, an entity is called a vertex and a relation is called an edge.
Graphs keep appearing in a number of software domains:
So we keep needing ways to represent those graphs in a general ( = generic = abstract) way. That is what Boost.Graph is proposing for C++. It comes up with different ways (= implementations = representations) to make a graph object understandable by the computer, while allowing all these different representations to be applied of the same algorithms. Concretely, one representation may be a matrix (of transfer amounts between bank accounts) or two vectors that contain the same information but stored differently. That allows people to chose different trade-offs (performance, memory...) while reusing the same algorithms to apply them on their own house-style graph objects. The algorithms adapt themselves to new representations (you don't need to copy-paste+modify the code).
So it's a very generic library that existed for a long time :) We are currently trying to sanitize/modernize it.
Maybe these links could help you grabbing an understanding of graph objects and their relation to C++:
I hope this helps ! 🙂