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

Arc of a flow network implemented with adjacency lists. More...

#include <tpl_net.H>

Inheritance diagram for Aleph::Net_Arc< Arc_Info, F_Type >:
[legend]
Collaboration diagram for Aleph::Net_Arc< Arc_Info, F_Type >:
[legend]

Public Types

using Base = Graph_Aarc< Arc_Info >
 
using Flow_Type = F_Type
 
- Public Types inherited from GTArcCommon< Arc_Info >
using Item_Type = Arc_Info
 
using Arc_Type = Arc_Info
 

Public Member Functions

bool check_arc () const noexcept
 Return true if flow satisfies 0 <= flow <= cap.
 
 Net_Arc (const Arc_Info &info)
 Construct from arc info.
 
 Net_Arc (const Net_Arc &arc)
 Copy constructor.
 
 Net_Arc ()
 Default constructor.
 
Net_Arcoperator= (const Net_Arc &arc)
 Copy assignment.
 
- Public Member Functions inherited from Aleph::Graph_Aarc< Arc_Info >
 Graph_Aarc (const Arc_Info &info)
 
 Graph_Aarc (Arc_Info &&info=Arc_Info())
 
 Graph_Aarc (const Graph_Aarc &arc)
 
 Graph_Aarc (void *src, void *tgt, const Arc_Info &data)
 
 Graph_Aarc (void *src, void *tgt, Arc_Info &&data=Arc_Info())
 
Graph_Aarcoperator= (const Graph_Aarc &arc)
 
- Public Member Functions inherited from GTArcCommon< Arc_Info >
 GTArcCommon () noexcept=default
 data contained in arc
 
 GTArcCommon (const Arc_Info &info)
 Construct from info value (copy)
 
 GTArcCommon (Arc_Info &&info)
 Construct from info value (move)
 
 GTArcCommon (void *src, void *tgt, const Arc_Info &data)
 Construct with endpoints and info (copy)
 
 GTArcCommon (void *src, void *tgt, Arc_Info &&data=Arc_Info())
 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
 
Arc_Info & get_info () noexcept
 Return a modifiable reference to the arc data.
 
const Arc_Info & get_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
 

Public Attributes

Flow_Type cap = 0
 Capacity value.
 
Flow_Type flow = 0
 Flow value.
 
- Public Attributes inherited from GTArcCommon< Arc_Info >
void * src_node
 
void * tgt_node
 Please don't use.
 
Graph_Attr attrs
 Please don't use.
 
Arc_Info arc_info
 

Additional Inherited Members

Detailed Description

template<typename Arc_Info, typename F_Type = double>
struct Aleph::Net_Arc< Arc_Info, F_Type >

Arc of a flow network implemented with adjacency lists.

Net_Arc models a capacitated network arc with Arc_Info and a numeric Flow_Type for capacity and flow.

This class is only intended as the arc type for Net_Graph; do not instantiate it directly. Use Net_Graph::insert_arc() instead.

See also
Array_Graph Net_Graph Net_Node

Definition at line 114 of file tpl_net.H.

Member Typedef Documentation

◆ Base

template<typename Arc_Info , typename F_Type = double>
using Aleph::Net_Arc< Arc_Info, F_Type >::Base = Graph_Aarc<Arc_Info>

Definition at line 116 of file tpl_net.H.

◆ Flow_Type

template<typename Arc_Info , typename F_Type = double>
using Aleph::Net_Arc< Arc_Info, F_Type >::Flow_Type = F_Type

Definition at line 118 of file tpl_net.H.

Constructor & Destructor Documentation

◆ Net_Arc() [1/3]

template<typename Arc_Info , typename F_Type = double>
Aleph::Net_Arc< Arc_Info, F_Type >::Net_Arc ( const Arc_Info &  info)
inline

Construct from arc info.

Definition at line 130 of file tpl_net.H.

◆ Net_Arc() [2/3]

template<typename Arc_Info , typename F_Type = double>
Aleph::Net_Arc< Arc_Info, F_Type >::Net_Arc ( const Net_Arc< Arc_Info, F_Type > &  arc)
inline

Copy constructor.

Definition at line 136 of file tpl_net.H.

◆ Net_Arc() [3/3]

template<typename Arc_Info , typename F_Type = double>
Aleph::Net_Arc< Arc_Info, F_Type >::Net_Arc ( )
inline

Default constructor.

Definition at line 143 of file tpl_net.H.

Member Function Documentation

◆ check_arc()

template<typename Arc_Info , typename F_Type = double>
bool Aleph::Net_Arc< Arc_Info, F_Type >::check_arc ( ) const
inlinenoexcept

Return true if flow satisfies 0 <= flow <= cap.

Definition at line 127 of file tpl_net.H.

References Aleph::Net_Arc< Arc_Info, F_Type >::cap, Aleph::Net_Arc< Arc_Info, F_Type >::flow, and Aleph::maps().

◆ operator=()

template<typename Arc_Info , typename F_Type = double>
Net_Arc & Aleph::Net_Arc< Arc_Info, F_Type >::operator= ( const Net_Arc< Arc_Info, F_Type > &  arc)
inline

Member Data Documentation

◆ cap

template<typename Arc_Info , typename F_Type = double>
Flow_Type Aleph::Net_Arc< Arc_Info, F_Type >::cap = 0

◆ flow


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