7#ifndef GRAPHDOM_MULTISET_GRAPH_VERTEX_HANDLE_IMPL_H
8#define GRAPHDOM_MULTISET_GRAPH_VERTEX_HANDLE_IMPL_H
12#include "../../graph.h"
13#include "../vertex_base_handle.h"
14#include "../vertex_handle.h"
15#include "../../multiset_graph.h"
16#include "../multiset_graph_vertex_handle.h"
18template <
typename VertexType>
20graphdom::graph<VertexType>::template vertex_base_handle< typename
graphdom::graph<VertexType>::vertex_container* >( other ) {}
22template <
typename VertexType>
25 other.vertex_container_owner_graph_pointer,
26 other.vertex_container_owner_graph_edges_type,
30 throw std::runtime_error(
"Attempt to convert a \"graphdom::graph<VertexType>::vertex_handle\", which identifies a vertex belonging to a \"graphdom::set_graph<VertexType>\", to a \"graphdom::multiset_graph<VertexType>::vertex_handle\"");
32 this->vertex_container_pointer =
const_cast< typename graphdom::graph<VertexType>::vertex_container*
>( other.vertex_container_pointer );
35template<
typename VertexType>
37 if (
this != &other ) {
38 this->vertex_container_owner_graph_pointer = other.vertex_container_owner_graph_pointer;
39 this->vertex_container_owner_graph_edges_type = other.vertex_container_owner_graph_edges_type;
40 this->vertex_container_pointer = other.vertex_container_pointer;
45template<
typename VertexType>
48 this->vertex_container_owner_graph_pointer,
49 this->vertex_container_owner_graph_edges_type,
50 this->vertex_container_pointer
54template<
typename VertexType>
55typename graphdom::multiset_graph<VertexType>::adj_list graphdom::multiset_graph<VertexType>::vertex_handle::adj_list(
const edge_type edge_type)
const {
56 return typename graphdom::multiset_graph<VertexType>::adj_list(
57 this->vertex_container_owner_graph_pointer,
58 this->vertex_container_owner_graph_edges_type,
59 this->vertex_container_pointer,
61 graphdom::graph<VertexType>::edges_type_selection_type::undirected_edges :
62 graphdom::graph<VertexType>::edges_type_selection_type::directed_edges
66template<
typename VertexType>
67typename graphdom::graph<VertexType>::const_adj_list graphdom::multiset_graph<VertexType>::vertex_handle::const_adj_list()
const {
68 return typename graphdom::graph<VertexType>::const_adj_list(
69 this->vertex_container_owner_graph_pointer,
70 this->vertex_container_owner_graph_edges_type,
71 this->vertex_container_pointer
75template<
typename VertexType>
76typename graphdom::graph<VertexType>::const_adj_list graphdom::multiset_graph<VertexType>::vertex_handle::const_adj_list(
const edge_type edge_type)
const {
77 return typename graphdom::graph<VertexType>::const_adj_list(
78 this->vertex_container_owner_graph_pointer,
79 this->vertex_container_owner_graph_edges_type,
80 this->vertex_container_pointer,
82 graphdom::graph<VertexType>::edges_type_selection_type::undirected_edges :
83 graphdom::graph<VertexType>::edges_type_selection_type::directed_edges
87template<
typename VertexType>
88graphdom::multiset_graph<VertexType>::vertex_handle::vertex_handle(
89 const graph<VertexType>*
const vertex_container_owner_ptr,
90 typename graph<VertexType>::graph_edges_type vertex_container_owner_et,
91 typename graph<VertexType>::vertex_container*
const vertex_container_ptr):
92graphdom::graph<VertexType>::template vertex_base_handle< typename graphdom::graph<VertexType>::vertex_container* >(
93 vertex_container_owner_ptr,
94 vertex_container_owner_et,
Every valid instance of this class can be used to identify a specific vertex of a graph and to access...
Definition vertex_handle.h:32
Every graph created using this library is an instance of a concrete class publicly derived,...
Definition graph.h:43
Every valid instance of this class is a "container-like and non-owning" handle to a subset of the set...
Definition multiset_graph_adj_list.h:31
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
edge_type
The enumerated type whose values represent the two types of edges of a graph.
Definition graph.h:21
@ undirected
This enum value means undirected edge.
Definition graph.h:22