GraphDom
Loading...
Searching...
No Matches
set_graph.h
1/*
2 * Copyright 2026 Michele Comparini
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef GRAPHDOM_SET_GRAPH_H
8#define GRAPHDOM_SET_GRAPH_H
9
10#include "graph.h"
11
12namespace graphdom {
14
17 template <typename VertexType>
18 class set_graph : virtual public graph<VertexType> {
19 public:
21 ~set_graph() override = default;
22
29 [[nodiscard]] virtual std::pair<typename graph<VertexType>::vertex_handle,bool> insert_vertex(const VertexType& v_core) = 0;
30
37 [[nodiscard]] virtual std::pair<typename graph<VertexType>::vertex_handle,bool> insert_vertex(VertexType&& v_core) = 0;
38
40 protected:
41 using VertexContainerPointerType = const typename graphdom::graph<VertexType>::vertex_container*;
42 using edge_endpoint = typename graphdom::graph<VertexType>::template edge_endpoint< VertexContainerPointerType >;
43 template <typename EdgeLabelType>
44 using labeled_directed_edge_endpoint = typename graphdom::graph<VertexType>::template labeled_directed_edge_endpoint<VertexContainerPointerType,EdgeLabelType>;
45 template <typename EdgeLabelType>
46 using labeled_undirected_edge_endpoint = typename graphdom::graph<VertexType>::template labeled_undirected_edge_endpoint<VertexContainerPointerType,EdgeLabelType>;
47 using custom_edge_endpoint_less = typename graphdom::graph<VertexType>::template custom_edge_endpoint_less<VertexContainerPointerType>;
48 using adj_set = typename graphdom::graph<VertexType>::template adj_set<VertexContainerPointerType>;
49 using non_mixed_graph_vertex_container = typename graphdom::graph<VertexType>::template non_mixed_graph_vertex_container<VertexContainerPointerType>;
50 using mixed_graph_vertex_container = typename graphdom::graph<VertexType>::template mixed_graph_vertex_container<VertexContainerPointerType>;
51 template <typename EdgeLabelType>
52 using non_mixed_graph_labeled_vertex_container = typename graphdom::graph<VertexType>::template non_mixed_graph_labeled_vertex_container<VertexContainerPointerType,EdgeLabelType>;
53 template <typename EdgeLabelType>
54 using mixed_graph_labeled_vertex_container = typename graphdom::graph<VertexType>::template mixed_graph_labeled_vertex_container<VertexContainerPointerType,EdgeLabelType>;
55
56 static typename adj_set::const_iterator get_inner_iterator(const typename graphdom::graph<VertexType>::adj_list_const_iterator&);
57
58 static typename graphdom::graph<VertexType>::adj_list_iterator adj_list_iterator_factory(
59 const graphdom::set_graph<VertexType>* edge_set_vertex_graph_owner_ptr,
60 const non_mixed_graph_vertex_container* edge_begin_point_ptr,
61 graphdom::edge_type edge_set_vertex_graph_owner_edges_type,
62 typename adj_set::iterator inner_itr
63 );
64
65 static typename graphdom::graph<VertexType>::adj_list_iterator adj_list_iterator_factory(
66 const graphdom::set_graph<VertexType>* edge_set_vertex_graph_owner_ptr,
67 const mixed_graph_vertex_container* edge_begin_point_ptr,
68 typename adj_set::iterator inner_itr,
69 graphdom::edge_type inner_itr_edge_type,
70 bool inner_itr_is_limited_by_edge_type = false
71 );
73 };
74}
75
76#include "impl/set_graph.h"
77
78#endif //GRAPHDOM_SET_GRAPH_H
Every graph created using this library is an instance of a concrete class publicly derived,...
Definition graph.h:43
Every set graph created using this library is an instance of a concrete class publicly derived,...
Definition set_graph.h:18
~set_graph() override=default
To be polymorphic, this class has a virtual destructor.
virtual std::pair< typename graph< VertexType >::vertex_handle, bool > insert_vertex(const VertexType &v_core)=0
virtual std::pair< typename graph< VertexType >::vertex_handle, bool > insert_vertex(VertexType &&v_core)=0
Definition adj_list.h:16
edge_type
The enumerated type whose values represent the two types of edges of a graph.
Definition graph.h:21