Generic adjacency list implementation for directed graphs. More...
#include <algorithm>#include <cassert>#include <iterator>#include <ostream>#include <set>#include <unordered_map>#include <unordered_set>#include "GraphLib/internal/concepts.h"Go to the source code of this file.
Classes | |
| class | GraphLib::Internal::AdjacencyList< I, E > |
| Represents a directed (by nature) Adjacency List Graph Structure. More... | |
Functions | |
| template<typename I, typename E> | |
| std::ostream & | GraphLib::Internal::operator<< (std::ostream &os, const AdjacencyList< I, E > &adj_list) |
| Outputs the adjacency map to the given output stream. | |
Generic adjacency list implementation for directed graphs.
This class template implements an adjacency list data structure where edges can hold arbitrary information (any subclass of Edge) and must at least contain the target node ID.
Definition in file adjacency_list.h.
| std::ostream & GraphLib::Internal::operator<< | ( | std::ostream & | os, |
| const AdjacencyList< I, E > & | adj_list ) |
Outputs the adjacency map to the given output stream.
Iterates over each node and its associated edges, printing the node ID followed by a list of its edges in a human-readable format. Format: NODE_ID : [EDGE, EDGE] with EDGE being either "NODE_ID" or "NODE_ID (WEIGHT)" depending on edge type
| I | the Id Type used in the Adjaceny List. |
| E | the Edge Type used in the Adjaceny List. |
| os | The output stream to write to. |
| adj_list | The adjacency list to output. |
Definition at line 290 of file adjacency_list.h.