Easy_rider
 
Loading...
Searching...
No Matches
Graph.h File Reference

A generic Graph template parameterized on Node and Edge types. More...

#include <algorithm>
#include <concepts>
#include <utility>
#include <vector>
Include dependency graph for Graph.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Graph< T, U >
 A templated graph storing nodes of type T and edges of type U. More...
 

Concepts

concept  NodeConcept
 Concept that a Node type must satisfy.
 
concept  EdgeConcept
 Concept that an Edge type must satisfy, given a Node type T.
 

Detailed Description

A generic Graph template parameterized on Node and Edge types.

Defines two concepts (NodeConcept, EdgeConcept) to constrain the template parameters and implements a Graph that stores nodes and edges, with a convenience method to add an edge only if it does not already exist.