1#ifndef GRAPHLIB_INTERNAL_ABSTRACT_DIRECTED_GRAPH_H
2#define GRAPHLIB_INTERNAL_ABSTRACT_DIRECTED_GRAPH_H
24namespace GraphLib::Internal {
40template <val
id_data_type D, val
id_
id_type I, val
id_edge_type<I> E>
63 throw std::invalid_argument(
"Node with ID from_id does not exist");
66 throw std::invalid_argument(
"Node with ID to_id does not exist");
68 if (!this->
adj_list_.has_edge(from_id, to_id)) {
69 throw std::invalid_argument(
"Nodes don't have an edge");
72 this->
adj_list_.remove_edge(from_id, to_id);
Defines the generic abstract Graph class template supporting directed/undirected and weighted/unweigh...
A graph class representing directed graphs.
void remove_edge(I from_id, I to_id) override
Removes the directed edge from from_id to to_id.
bool is_directed() const override
Indicates that this graph is directed.
Abstract base class for a generic graph structure.
bool node_exists(const id_type id) const
Check if a node with the specified ID exists.
AdjacencyList< id_type, edge_type > adj_list_
Stores edges as adjacency list.
Defines C++20 concepts used for type constraints in the GraphLib library.