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

Residual arc type with mirror pointer. More...

#include <tpl_netcost.H>

Inheritance diagram for Aleph::Res_Arc< Ftype >:
[legend]
Collaboration diagram for Aleph::Res_Arc< Ftype >:
[legend]

Public Types

using Base = Net_Cost_Arc< Empty_Class, Ftype >
 
- Public Types inherited from Aleph::Net_Cost_Arc< Empty_Class, Ftype >
using Base = Net_Arc< Empty_Class, Ftype >
 
using Base = Graph_Aarc< Empty_Class >
 
using Flow_Type = Ftype
 Type representing flow, capacity, and cost values.
 
- Public Types inherited from Aleph::Net_Arc< Arc_Info, F_Type >
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 Attributes

bool is_residual = false
 True if this is a residual (backward) arc.
 
Res_Arcimg = nullptr
 Pointer to the mirror arc in the opposite direction.
 
- Public Attributes inherited from Aleph::Net_Cost_Arc< Empty_Class, Ftype >
Flow_Type cost
 Cost per unit of flow (negative for residual arcs).
 
- Public Attributes inherited from Aleph::Net_Arc< Arc_Info, F_Type >
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

- Public Member Functions inherited from Aleph::Net_Cost_Arc< Empty_Class, Ftype >
 Net_Cost_Arc ()=default
 Default constructor.
 
 Net_Cost_Arc (const Net_Cost_Arc &a)
 Copy constructor.
 
Net_Cost_Arcoperator= (const Net_Cost_Arc &a)
 Copy assignment operator.
 
Flow_Type flow_cost () const noexcept
 Return the cost of the current flow through this arc.
 
- Public Member Functions inherited from Aleph::Net_Arc< Arc_Info, F_Type >
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
 

Detailed Description

template<typename Ftype>
struct Aleph::Res_Arc< Ftype >

Residual arc type with mirror pointer.

Extends Net_Cost_Arc with a flag indicating if this is a residual arc and a pointer to the mirror arc in the opposite direction.

Template Parameters
FtypeFlow/cost numeric type.

Definition at line 418 of file tpl_netcost.H.

Member Typedef Documentation

◆ Base

Definition at line 420 of file tpl_netcost.H.

Member Data Documentation

◆ img

Pointer to the mirror arc in the opposite direction.

Definition at line 427 of file tpl_netcost.H.

◆ is_residual

template<typename Ftype >
bool Aleph::Res_Arc< Ftype >::is_residual = false

True if this is a residual (backward) arc.

Definition at line 424 of file tpl_netcost.H.


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