GraphDom
Loading...
Searching...
No Matches
labeled_edge_non_mixed_graph.h
1/*
2 * Copyright 2026 Michele Comparini
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef GRAPHDOM_LABELED_EDGE_NON_MIXED_GRAPH_H
8#define GRAPHDOM_LABELED_EDGE_NON_MIXED_GRAPH_H
9
10#include "labeled_edge_graph.h"
11#include "non_mixed_graph.h"
12
13namespace graphdom {
15
18 template <
19 typename VertexType,
20 typename EdgeLabelType,
21 typename EdgeLabellerType = default_edge_labeller<VertexType,EdgeLabelType>
22 >
23 class labeled_edge_non_mixed_graph : virtual public labeled_edge_graph<VertexType,EdgeLabelType>, virtual public non_mixed_graph<VertexType> {
24 public:
25 labeled_edge_non_mixed_graph();
26 explicit labeled_edge_non_mixed_graph(const EdgeLabellerType& edge_labeller);
27 explicit labeled_edge_non_mixed_graph(EdgeLabellerType&& edge_labeller);
28
30 ~labeled_edge_non_mixed_graph() override = default;
31
32 [[nodiscard]] constexpr const EdgeLabellerType& get_edges_labeller() const;
33
34 using non_mixed_graph<VertexType>::insert_edge;
35
44 void insert_edge(const typename graph<VertexType>::vertex_const_handle& first_endpoint, const typename graph<VertexType>::vertex_const_handle& second_endpoint) final;
45
55 virtual 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) = 0;
56
67 virtual void insert_edge(const typename graph<VertexType>::vertex_const_handle& first_endpoint, const typename graph<VertexType>::vertex_const_handle& second_endpoint, EdgeLabelType&& edge_label) = 0;
68 private:
69 EdgeLabellerType edges_labeller;
70 };
71}
72
73#include "impl/labeled_edge_non_mixed_graph.h"
74
75#endif //GRAPHDOM_LABELED_EDGE_NON_MIXED_GRAPH_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
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 labeled-edge graph created using this library is an instance of a concrete class publicly deriv...
Definition labeled_edge_graph.h:21
virtual void insert_edge(const typename graph< VertexType >::vertex_const_handle &first_endpoint, const typename graph< VertexType >::vertex_const_handle &second_endpoint, EdgeLabelType &&edge_label)=0
virtual 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)=0
~labeled_edge_non_mixed_graph() override=default
To be polymorphic, this class has a virtual destructor.
void insert_edge(const typename graph< VertexType >::vertex_const_handle &first_endpoint, const typename graph< VertexType >::vertex_const_handle &second_endpoint) final
Definition labeled_edge_non_mixed_graph.h:27
Every non-mixed graph created using this library is an instance of a concrete class publicly derived,...
Definition non_mixed_graph.h:18
Definition adj_list.h:16