GraphDom
Loading...
Searching...
No Matches
graphdom::labeled_vertex_graph< VertexType, VertexLabelType > Class Template Referenceabstract

Every labeled-vertex graph created using this library is an instance of a concrete class publicly derived, directly or indirectly, from this polymorphic template class. More...

#include <labeled_vertex_graph.h>

Inheritance diagram for graphdom::labeled_vertex_graph< VertexType, VertexLabelType >:
Collaboration diagram for graphdom::labeled_vertex_graph< VertexType, VertexLabelType >:

Public Member Functions

 ~labeled_vertex_graph () override=default
 To be polymorphic, this class has a virtual destructor.
virtual const VertexLabelType & get_vertex_label (const typename graph< VertexType >::vertex_const_handle &vertex) const =0
virtual VertexLabelType & get_vertex_label (const typename graph< VertexType >::vertex_const_handle &vertex)=0
Public Member Functions inherited from graphdom::graph< VertexType >
virtual ~graph ()=default
 To be polymorphic, this class has a virtual destructor.
virtual std::size_t order () const =0
 Returns the order of *this, i.e. the number of vertices inside the graph.
virtual void erase_vertex (const vertex_const_handle &vertex)=0
 Removes the vertex identified by vertex.
virtual adj_list_iterator erase_edge (const adj_list_const_iterator &)=0

Detailed Description

template<typename VertexType, typename VertexLabelType>
class graphdom::labeled_vertex_graph< VertexType, VertexLabelType >

Every labeled-vertex graph created using this library is an instance of a concrete class publicly derived, directly or indirectly, from this polymorphic template class.

Creating an object of a user-defined class derived, directly or indirectly, from this one will cause undefined behavior.

Every labeled-vertex graph created with this library can be considered equivalent to a labeled-vertex graph consistent with the definition found on the "Mathematical Introduction" page:
referring to the symbols used in that definition, \( C_{l_V} \) is the set of all possible instances of VertexLabelType .

Member Function Documentation

◆ get_vertex_label() [1/2]

template<typename VertexType, typename VertexLabelType>
virtual const VertexLabelType & graphdom::labeled_vertex_graph< VertexType, VertexLabelType >::get_vertex_label ( const typename graph< VertexType >::vertex_const_handle & vertex) const
nodiscardpure virtual

If vertex is valid then returns a const reference to the label of the vertex identified by vertex (with respect to *this).

Parameters
vertexThis handle must be valid and must identify a vertex belonging to *this, otherwise this method will cause undefined behavior.
Returns
A const reference to label of the vertex identified by vertex (with respect to *this).
Complexity
Constant.

Implemented in graphdom::full_labeled_multiset_digraph< VertexType, VertexLabelType, EdgeLabelType, VertexLabellerType, EdgeLabellerType >, graphdom::full_labeled_multiset_ugraph< VertexType, VertexLabelType, EdgeLabelType, VertexLabellerType, EdgeLabellerType >, graphdom::full_labeled_set_digraph< VertexType, VertexLabelType, EdgeLabelType, Compare, VertexLabellerType, EdgeLabellerType >, and graphdom::full_labeled_set_ugraph< VertexType, VertexLabelType, EdgeLabelType, Compare, VertexLabellerType, EdgeLabellerType >.

◆ get_vertex_label() [2/2]

template<typename VertexType, typename VertexLabelType>
virtual VertexLabelType & graphdom::labeled_vertex_graph< VertexType, VertexLabelType >::get_vertex_label ( const typename graph< VertexType >::vertex_const_handle & vertex)
nodiscardpure virtual

If vertex is valid then returns a reference to the label of the vertex identified by vertex (with respect to *this).

Parameters
vertexThis handle must be valid and must identify a vertex belonging to *this, otherwise this method will cause undefined behavior.
Returns
A reference to label of the vertex identified by vertex (with respect to *this).
Complexity
Constant.

Implemented in graphdom::full_labeled_multiset_digraph< VertexType, VertexLabelType, EdgeLabelType, VertexLabellerType, EdgeLabellerType >, graphdom::full_labeled_multiset_ugraph< VertexType, VertexLabelType, EdgeLabelType, VertexLabellerType, EdgeLabellerType >, graphdom::full_labeled_set_digraph< VertexType, VertexLabelType, EdgeLabelType, Compare, VertexLabellerType, EdgeLabellerType >, and graphdom::full_labeled_set_ugraph< VertexType, VertexLabelType, EdgeLabelType, Compare, VertexLabellerType, EdgeLabellerType >.


The documentation for this class was generated from the following file: