Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Graph_Sarc< Arc_Info > Class Template Reference

Arc for graphs implemented with simple adjacency lists. More...

#include <tpl_sgraph.H>

Inheritance diagram for Aleph::Graph_Sarc< Arc_Info >:
[legend]
Collaboration diagram for Aleph::Graph_Sarc< Arc_Info >:
[legend]

Public Member Functions

 Graph_Sarc (const Arc_Info &info)
 
 Graph_Sarc (Arc_Info &&info=Arc_Info())
 
 Graph_Sarc (const Graph_Sarc &arc)
 
Graph_Sarcoperator= (const Graph_Sarc &arc)
 
 Graph_Sarc (void *src, void *tgt, const Arc_Info &data)
 
 Graph_Sarc (void *src, void *tgt, Arc_Info &&data)
 
- Public Member Functions inherited from GTArcCommon< ArcInfo >
 GTArcCommon () noexcept=default
 data contained in arc
 
 GTArcCommon (const ArcInfo &info)
 Construct from info value (copy)
 
 GTArcCommon (ArcInfo &&info)
 Construct from info value (move)
 
 GTArcCommon (void *src, void *tgt, const ArcInfo &data)
 Construct with endpoints and info (copy)
 
 GTArcCommon (void *src, void *tgt, ArcInfo &&data=ArcInfo())
 Construct with endpoints and info (move)
 
 GTArcCommon (const GTArcCommon &other)
 Copy constructor.
 
 GTArcCommon (GTArcCommon &&other) noexcept
 Move constructor.
 
GTArcCommonoperator= (const GTArcCommon &other)
 Copy assignment operator.
 
GTArcCommonoperator= (GTArcCommon &&other) noexcept
 Move assignment operator.
 
unsigned int state () const noexcept
 Return the state of arc.
 
void set_state (unsigned int s) noexcept
 Set the state of arc to value s
 
ArcInfoget_info () noexcept
 Return a modifiable reference to the arc data.
 
const ArcInfoget_info () const noexcept
 Return a constant reference to the arc data.
 
void * get_connected_node (void *node) noexcept
 
void * get_img_node (void *node) noexcept
 

Private Types

using Base = GTArcCommon< Arc_Info >
 

Additional Inherited Members

- Public Types inherited from GTArcCommon< ArcInfo >
using Item_Type = ArcInfo
 
using Arc_Type = ArcInfo
 
- Public Attributes inherited from GTArcCommon< ArcInfo >
void * src_node = nullptr
 
void * tgt_node = nullptr
 Please don't use.
 
Graph_Attr attrs
 Please don't use.
 
ArcInfo arc_info
 

Detailed Description

template<typename Arc_Info = Empty_Class>
class Aleph::Graph_Sarc< Arc_Info >

Arc for graphs implemented with simple adjacency lists.

This class defines an arc or edge of a graph or digraph implemented using singly-linked adjacency lists.

There are basically three ways to define the information that belongs to a graph arc:

  • Through the type parameter inherent to the arc called Arc_Info.
  • Through inheritance from this base class. This is the way to maintain different arc types in a graph.
  • A combination of the above two.
Template Parameters
Arc_InfoData type stored in the arc and accessible via the get_info() method.
Note
This class is only intended for defining graph arcs. It is not intended to be used directly by users. It is preferable to use it through the methods provided by List_SGraph. While it is possible to use some methods or access some of its attributes, it is highly recommended not to use them directly. Instead, use the List_SGraph::Arc type and its associated methods.

A graph arc has three additional attributes present for each arc, named as follows:

  • Control bits (Bit_Fields): set of bits used by algorithms to mark the arc.
  • Counter (counter): counter generally used to mark a visit or processing order.
  • cookie: opaque pointer to any other temporary information to be associated with the arc.
See also
List_SGraph List_SDigraph Graph_Snode Bit_Fields

Definition at line 196 of file tpl_sgraph.H.

Member Typedef Documentation

◆ Base

template<typename Arc_Info = Empty_Class>
using Aleph::Graph_Sarc< Arc_Info >::Base = GTArcCommon<Arc_Info>
private

Definition at line 198 of file tpl_sgraph.H.

Constructor & Destructor Documentation

◆ Graph_Sarc() [1/5]

template<typename Arc_Info = Empty_Class>
Aleph::Graph_Sarc< Arc_Info >::Graph_Sarc ( const Arc_Info &  info)
inline

Definition at line 201 of file tpl_sgraph.H.

◆ Graph_Sarc() [2/5]

template<typename Arc_Info = Empty_Class>
Aleph::Graph_Sarc< Arc_Info >::Graph_Sarc ( Arc_Info &&  info = Arc_Info())
inline

Definition at line 207 of file tpl_sgraph.H.

◆ Graph_Sarc() [3/5]

template<typename Arc_Info = Empty_Class>
Aleph::Graph_Sarc< Arc_Info >::Graph_Sarc ( const Graph_Sarc< Arc_Info > &  arc)
inline

Definition at line 213 of file tpl_sgraph.H.

◆ Graph_Sarc() [4/5]

template<typename Arc_Info = Empty_Class>
Aleph::Graph_Sarc< Arc_Info >::Graph_Sarc ( void src,
void tgt,
const Arc_Info &  data 
)
inline

Definition at line 227 of file tpl_sgraph.H.

◆ Graph_Sarc() [5/5]

template<typename Arc_Info = Empty_Class>
Aleph::Graph_Sarc< Arc_Info >::Graph_Sarc ( void src,
void tgt,
Arc_Info &&  data 
)
inline

Definition at line 233 of file tpl_sgraph.H.

Member Function Documentation

◆ operator=()

template<typename Arc_Info = Empty_Class>
Graph_Sarc & Aleph::Graph_Sarc< Arc_Info >::operator= ( const Graph_Sarc< Arc_Info > &  arc)
inline

Definition at line 219 of file tpl_sgraph.H.

References GTArcCommon< ArcInfo >::arc_info.


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