7#ifndef GRAPHDOM_MULTISET_GRAPH_ADJ_LIST_IMPL_H
8#define GRAPHDOM_MULTISET_GRAPH_ADJ_LIST_IMPL_H
10#include "../../graph.h"
11#include "../base_adj_list.h"
12#include "../adj_list.h"
13#include "../../multiset_graph.h"
14#include "../multiset_graph_adj_list.h"
16template <
typename VertexType>
17graphdom::multiset_graph<VertexType>::adj_list::adj_list(
const adj_list& other) :
18graphdom::graph<VertexType>::template base_adj_list< typename
graphdom::graph<VertexType>::vertex_container* >( other ){}
20template<
typename VertexType>
21graphdom::multiset_graph<VertexType>::adj_list::adj_list(
const typename graph<VertexType>::adj_list& other) :
22graphdom::graph<VertexType>::template base_adj_list< typename
graphdom::graph<VertexType>::vertex_container* >(
23 other.adj_list_common_begin_point_vertex_container_pointer,
24 other.adj_list_owner_graph_edges_type,
26 other.adj_list_edges_type_selection
29 throw std::runtime_error(
"Attempt to convert a \"graphdom::graph<VertexType>::adj_list\", which identifies an adj list belonging to a \"graphdom::set_graph<VertexType>\", to a \"graphdom::multiset_graph<VertexType>::adj_list\"");
31 this->adj_list_common_begin_point_vertex_container_pointer =
const_cast< typename graphdom::graph<VertexType>::vertex_container*
>( other.adj_list_common_begin_point_vertex_container_pointer );
34template<
typename VertexType>
35typename graphdom::multiset_graph<VertexType>::adj_list_iterator graphdom::multiset_graph<VertexType>::adj_list::begin()
const {
36 if (
dynamic_cast< const graphdom::multiset_graph<VertexType>*
>( this->adj_list_owner_graph_pointer ) !=
nullptr ) {
37 return graphdom::multiset_graph<VertexType>::adj_list_iterator( this->
template internal_begin<
typename graphdom::graph<VertexType>::vertex_container*>() );
39 return graphdom::multiset_graph<VertexType>::adj_list_iterator( this->
template internal_begin<
const typename graphdom::graph<VertexType>::vertex_container*>() );
42template<
typename VertexType>
43typename graphdom::multiset_graph<VertexType>::adj_list_iterator graphdom::multiset_graph<VertexType>::adj_list::end()
const {
44 if (
dynamic_cast< const graphdom::multiset_graph<VertexType>*
>( this->adj_list_owner_graph_pointer ) !=
nullptr ) {
45 return graphdom::multiset_graph<VertexType>::adj_list_iterator( this->
template internal_end<
typename graphdom::graph<VertexType>::vertex_container*>() );
47 return graphdom::multiset_graph<VertexType>::adj_list_iterator( this->
template internal_end<
const typename graphdom::graph<VertexType>::vertex_container*>() );
50template<
typename VertexType>
51typename graphdom::graph<VertexType>::adj_list_const_iterator graphdom::multiset_graph<VertexType>::adj_list::cbegin()
const {
55template<
typename VertexType>
56typename graphdom::graph<VertexType>::adj_list_const_iterator graphdom::multiset_graph<VertexType>::adj_list::cend()
const {
60template<
typename VertexType>
61graphdom::multiset_graph<VertexType>::adj_list::adj_list(
62 const graph<VertexType>*
const adj_list_owner_graph_pointer,
63 const typename graphdom::graph<VertexType>::graph_edges_type adj_list_owner_graph_edges_type,
64 typename graphdom::graph<VertexType>::vertex_container*
const adj_list_common_begin_point_vertex_container_pointer,
65 const typename graphdom::graph<VertexType>::edges_type_selection_type adj_list_edges_type_selection ) :
66graphdom::graph<VertexType>::template base_adj_list< typename graphdom::graph<VertexType>::vertex_container* >(
67 adj_list_owner_graph_pointer,
68 adj_list_owner_graph_edges_type,
69 adj_list_common_begin_point_vertex_container_pointer,
70 adj_list_edges_type_selection
Every multiset graph created using this library is an instance of a concrete class publicly derived,...
Definition multiset_graph.h:19