GraphDom
Loading...
Searching...
No Matches
full_labeled_multiset_digraph.h
1/*
2 * Copyright 2026 Michele Comparini
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef GRAPHDOM_FULL_LABELED_MULTISET_DIGRAPH_H
8#define GRAPHDOM_FULL_LABELED_MULTISET_DIGRAPH_H
9
10#include <forward_list>
11
12#include "labeled_vertex_graph.h"
13#include "labeled_vertex_multiset_graph.h"
14#include "labeled_edge_graph.h"
15#include "labeled_edge_non_mixed_graph.h"
16
17namespace graphdom {
26 template<
27 typename VertexType,
28 typename VertexLabelType,
29 typename EdgeLabelType,
30 typename VertexLabellerType = default_vertex_labeller<VertexType,VertexLabelType>,
31 typename EdgeLabellerType = default_edge_labeller<VertexType,EdgeLabelType>
32 >
33 class full_labeled_multiset_digraph final :
34 virtual public labeled_vertex_multiset_graph<VertexType,VertexLabelType,VertexLabellerType>,
35 virtual public labeled_edge_non_mixed_graph<VertexType,EdgeLabelType,EdgeLabellerType> {
36 public:
37 full_labeled_multiset_digraph();
38 full_labeled_multiset_digraph(const VertexLabellerType& v_lab, const EdgeLabellerType& e_lab);
39 explicit full_labeled_multiset_digraph(const VertexLabellerType& v_lab, EdgeLabellerType&& e_lab = EdgeLabellerType());
40 full_labeled_multiset_digraph(VertexLabellerType&& v_lab, const EdgeLabellerType& e_lab);
41 explicit full_labeled_multiset_digraph(VertexLabellerType&& v_lab, EdgeLabellerType&& e_lab = EdgeLabellerType());
42
43 ~full_labeled_multiset_digraph() override;
44
50 [[nodiscard]] std::size_t order() const override;
54 [[nodiscard]] const VertexLabelType& get_vertex_label(const typename graph<VertexType>::vertex_const_handle& vertex) const override;
58 [[nodiscard]] const EdgeLabelType& get_edge_label(const typename graph<VertexType>::adj_list_const_iterator&) const override;
59
63 void erase_vertex(const typename graphdom::graph<VertexType>::vertex_const_handle& vertex) override;
67 [[nodiscard]] typename graphdom::graph<VertexType>::adj_list_iterator erase_edge(const typename graph<VertexType>::adj_list_const_iterator&) override;
71 [[nodiscard]] VertexLabelType& get_vertex_label(const typename graph<VertexType>::vertex_const_handle& vertex) override;
78 [[nodiscard]] typename multiset_graph<VertexType>::vertex_handle insert_vertex(const VertexType& v_core, const VertexLabelType& vertex_label) override;
84 [[nodiscard]] typename multiset_graph<VertexType>::vertex_handle insert_vertex(const VertexType& v_core, VertexLabelType&& vertex_label) override;
90 [[nodiscard]] typename multiset_graph<VertexType>::vertex_handle insert_vertex(VertexType&& v_core, const VertexLabelType& vertex_label) override;
96 [[nodiscard]] typename multiset_graph<VertexType>::vertex_handle insert_vertex(VertexType&& v_core, VertexLabelType&& vertex_label) override;
100 [[nodiscard]] EdgeLabelType& get_edge_label(const typename graph<VertexType>::adj_list_const_iterator&) override;
101 using graphdom::labeled_edge_non_mixed_graph<VertexType,EdgeLabelType,EdgeLabellerType>::insert_edge;
110 void insert_edge(const typename graph<VertexType>::vertex_const_handle& tail, const typename graph<VertexType>::vertex_const_handle& head, const EdgeLabelType& edge_label) override;
120 void insert_edge(const typename graph<VertexType>::vertex_const_handle& tail, const typename graph<VertexType>::vertex_const_handle& head, EdgeLabelType&& edge_label) override;
121 private:
122 using VertexContainerPointerType = typename graphdom::multiset_graph<VertexType>::VertexContainerPointerType;
123 using edge_endpoint = typename graphdom::multiset_graph<VertexType>::template labeled_directed_edge_endpoint<EdgeLabelType>;
124 using vertex_container = typename graphdom::multiset_graph<VertexType>::template non_mixed_graph_labeled_vertex_container<VertexLabelType>;
125
126 static void safe_edge_endpoint_deallocation(typename graphdom::graph<VertexType>::template edge_endpoint<VertexContainerPointerType>*);
127
128 std::forward_list<vertex_container> vertices;
129 std::size_t number_of_vertices_inserted;
130 };
131}
132
133#include "impl/full_labeled_multiset_digraph.h"
134
135#endif //GRAPHDOM_FULL_LABELED_MULTISET_DIGRAPH_H
This class template is the default vertex labeller used by all labeled-edge graphs if no user-specifi...
Definition labeled_edge_graph.h:37
This class template is the default vertex labeller used by all labeled-vertex graphs if no user-speci...
Definition labeled_vertex_graph.h:53
void insert_edge(const typename graph< VertexType >::vertex_const_handle &tail, const typename graph< VertexType >::vertex_const_handle &head, const EdgeLabelType &edge_label) override
Definition full_labeled_multiset_digraph.h:238
std::size_t order() const override
Returns the order of *this, i.e. the number of vertices inside the graph.
Definition full_labeled_multiset_digraph.h:62
graphdom::graph< VertexType >::adj_list_iterator erase_edge(const typename graph< VertexType >::adj_list_const_iterator &) override
Definition full_labeled_multiset_digraph.h:131
const VertexLabelType & get_vertex_label(const typename graph< VertexType >::vertex_const_handle &vertex) const override
Definition full_labeled_multiset_digraph.h:67
void erase_vertex(const typename graphdom::graph< VertexType >::vertex_const_handle &vertex) override
Removes the vertex identified by vertex.
Definition full_labeled_multiset_digraph.h:92
const EdgeLabelType & get_edge_label(const typename graph< VertexType >::adj_list_const_iterator &) const override
Definition full_labeled_multiset_digraph.h:77
multiset_graph< VertexType >::vertex_handle insert_vertex(const VertexType &v_core, const VertexLabelType &vertex_label) override
Definition full_labeled_multiset_digraph.h:160
Every valid instance of this class can be used to identify a specific vertex of a graph and to access...
Definition vertex_const_handle.h:35
Every graph created using this library is an instance of a concrete class publicly derived,...
Definition graph.h:43
Every labeled-edge non-mixed graph created using this library is an instance of a concrete class publ...
Definition labeled_edge_non_mixed_graph.h:23
Every valid instance of this class can be used to identify a specific vertex of a multiset graph and ...
Definition multiset_graph_vertex_handle.h:31
Every multiset graph created using this library is an instance of a concrete class publicly derived,...
Definition multiset_graph.h:19
Definition adj_list.h:16