GraphDom
Loading...
Searching...
No Matches
labeled_vertex_set_graph.h
1/*
2 * Copyright 2026 Michele Comparini
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef GRAPHDOM_LABELED_VERTEX_SET_GRAPH_H
8#define GRAPHDOM_LABELED_VERTEX_SET_GRAPH_H
9
10#include <utility>
11
12#include "labeled_vertex_graph.h"
13
14namespace graphdom {
16
19 template <
20 typename VertexType,
21 typename VertexLabelType,
22 typename VertexLabellerType = default_vertex_labeller<VertexType,VertexLabelType>
23 >
24 class labeled_vertex_set_graph : virtual public labeled_vertex_graph<VertexType,VertexLabelType>, virtual public set_graph<VertexType> {
25 public:
26 labeled_vertex_set_graph();
27 explicit labeled_vertex_set_graph(const VertexLabellerType&);
28 explicit labeled_vertex_set_graph(VertexLabellerType&&);
29
31 ~labeled_vertex_set_graph() override = default;
32
33 [[nodiscard]] constexpr const VertexLabellerType& get_vertices_labeller() const;
34
35 using set_graph<VertexType>::insert_vertex;
36
44 [[nodiscard]] std::pair<typename graph<VertexType>::vertex_handle,bool> insert_vertex(const VertexType& v_core) final;
45
54 [[nodiscard]] std::pair<typename graph<VertexType>::vertex_handle,bool> insert_vertex(VertexType&& v_core) final;
55
64 [[nodiscard]] virtual std::pair<typename graph<VertexType>::vertex_handle,bool> insert_vertex(const VertexType& v_core, const VertexLabelType& vertex_label) = 0;
65
75 [[nodiscard]] virtual std::pair<typename graph<VertexType>::vertex_handle,bool> insert_vertex(const VertexType& v_core, VertexLabelType&& vertex_label) = 0;
76
86 [[nodiscard]] virtual std::pair<typename graph<VertexType>::vertex_handle,bool> insert_vertex(VertexType&& v_core, const VertexLabelType& vertex_label) = 0;
87
97 [[nodiscard]] virtual std::pair<typename graph<VertexType>::vertex_handle,bool> insert_vertex(VertexType&& v_core, VertexLabelType&& vertex_label) = 0;
98 private:
99 VertexLabellerType vertices_labeller;
100 };
101}
102
103#include "impl/labeled_vertex_set_graph.h"
104
105#endif //GRAPHDOM_LABELED_VERTEX_SET_GRAPH_H
This class template is the default vertex labeller used by all labeled-vertex graphs if no user-speci...
Definition labeled_vertex_graph.h:53
Every labeled-vertex graph created using this library is an instance of a concrete class publicly der...
Definition labeled_vertex_graph.h:21
virtual std::pair< typename graph< VertexType >::vertex_handle, bool > insert_vertex(VertexType &&v_core, VertexLabelType &&vertex_label)=0
virtual std::pair< typename graph< VertexType >::vertex_handle, bool > insert_vertex(const VertexType &v_core, VertexLabelType &&vertex_label)=0
virtual std::pair< typename graph< VertexType >::vertex_handle, bool > insert_vertex(const VertexType &v_core, const VertexLabelType &vertex_label)=0
virtual std::pair< typename graph< VertexType >::vertex_handle, bool > insert_vertex(VertexType &&v_core, const VertexLabelType &vertex_label)=0
~labeled_vertex_set_graph() override=default
To be polymorphic, this class has a virtual destructor.
std::pair< typename graph< VertexType >::vertex_handle, bool > insert_vertex(const VertexType &v_core) final
Definition labeled_vertex_set_graph.h:27
Every set graph created using this library is an instance of a concrete class publicly derived,...
Definition set_graph.h:18
Definition adj_list.h:16