GraphDom
Loading...
Searching...
No Matches
full_labeled_multiset_ugraph.h
1/*
2 * Copyright 2026 Michele Comparini
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef GRAPHDOM_FULL_LABELED_MULTISET_UGRAPH_H
8#define GRAPHDOM_FULL_LABELED_MULTISET_UGRAPH_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_ugraph 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_ugraph();
38 full_labeled_multiset_ugraph(const VertexLabellerType& v_lab, const EdgeLabellerType& e_lab);
39 explicit full_labeled_multiset_ugraph(const VertexLabellerType& v_lab, EdgeLabellerType&& e_lab = EdgeLabellerType());
40 full_labeled_multiset_ugraph(VertexLabellerType&& v_lab, const EdgeLabellerType& e_lab);
41 explicit full_labeled_multiset_ugraph(VertexLabellerType&& v_lab, EdgeLabellerType&& e_lab = EdgeLabellerType());
42
43 ~full_labeled_multiset_ugraph() 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;
72 using graphdom::labeled_vertex_multiset_graph<VertexType,VertexLabelType,VertexLabellerType>::insert_vertex;
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& first_endpoint, const typename graph<VertexType>::vertex_const_handle& second_endpoint, const EdgeLabelType& edge_label) override;
121 void insert_edge(const typename graph<VertexType>::vertex_const_handle& first_endpoint, const typename graph<VertexType>::vertex_const_handle& second_endpoint, EdgeLabelType&& edge_label) override;
122 private:
123 using VertexContainerPointerType = typename graphdom::multiset_graph<VertexType>::VertexContainerPointerType;
124 using edge_endpoint = typename graphdom::multiset_graph<VertexType>::template labeled_undirected_edge_endpoint<EdgeLabelType>;
125 using vertex_container = typename graphdom::multiset_graph<VertexType>::template non_mixed_graph_labeled_vertex_container<VertexLabelType>;
126
127 static void safe_edge_endpoint_deallocation(typename graphdom::graph<VertexType>::template edge_endpoint<VertexContainerPointerType>*);
128
129 std::forward_list<vertex_container> vertices;
130 std::size_t number_of_vertices_inserted;
131 };
132}
133
134#include "impl/full_labeled_multiset_ugraph.h"
135
136#endif //GRAPHDOM_FULL_LABELED_MULTISET_UGRAPH_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
const VertexLabelType & get_vertex_label(const typename graph< VertexType >::vertex_const_handle &vertex) const override
Definition full_labeled_multiset_ugraph.h:67
multiset_graph< VertexType >::vertex_handle insert_vertex(const VertexType &v_core, const VertexLabelType &vertex_label) override
Definition full_labeled_multiset_ugraph.h:178
const EdgeLabelType & get_edge_label(const typename graph< VertexType >::adj_list_const_iterator &) const override
Definition full_labeled_multiset_ugraph.h:77
void insert_edge(const typename graph< VertexType >::vertex_const_handle &first_endpoint, const typename graph< VertexType >::vertex_const_handle &second_endpoint, const EdgeLabelType &edge_label) override
Definition full_labeled_multiset_ugraph.h:259
std::size_t order() const override
Returns the order of *this, i.e. the number of vertices inside the graph.
Definition full_labeled_multiset_ugraph.h:62
graphdom::graph< VertexType >::adj_list_iterator erase_edge(const typename graph< VertexType >::adj_list_const_iterator &) override
Definition full_labeled_multiset_ugraph.h:144
void erase_vertex(const typename graphdom::graph< VertexType >::vertex_const_handle &vertex) override
Removes the vertex identified by vertex.
Definition full_labeled_multiset_ugraph.h:95
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 labeled-vertex multiset graph created using this library is an instance of a concrete class pub...
Definition labeled_vertex_multiset_graph.h:24
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