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

Represents a flow path from source to sink. More...

#include <tpl_maxflow.H>

Collaboration diagram for Aleph::FlowPath< Net >:
[legend]

Public Types

using Arc = typename Net::Arc
 
using Node = typename Net::Node
 
using Flow_Type = typename Net::Flow_Type
 

Public Member Functions

bool is_empty () const noexcept
 Check if a path is empty.
 
size_t length () const noexcept
 Get path length (number of arcs).
 

Public Attributes

DynList< Arc * > arcs
 Arcs in the path (source to sink order)
 
DynList< Node * > nodes
 Nodes in the path.
 
Flow_Type flow {0}
 Flow on this path.
 

Detailed Description

template<class Net>
struct Aleph::FlowPath< Net >

Represents a flow path from source to sink.

A flow path consists of:

  • A sequence of arcs from source to sink
  • The amount of flow on this path
Template Parameters
NetNetwork type.

Definition at line 720 of file tpl_maxflow.H.

Member Typedef Documentation

◆ Arc

Definition at line 722 of file tpl_maxflow.H.

◆ Flow_Type

Definition at line 724 of file tpl_maxflow.H.

◆ Node

Definition at line 723 of file tpl_maxflow.H.

Member Function Documentation

◆ is_empty()

template<class Net >
bool Aleph::FlowPath< Net >::is_empty ( ) const
inlinenoexcept

Check if a path is empty.

Returns
true if the path has no arcs, false otherwise.
Exceptions
none
Note
Complexity: O(1)
Thread safety: Thread-safe for read-only access.
Exception safety: noexcept

Definition at line 737 of file tpl_maxflow.H.

References Aleph::FlowPath< Net >::arcs, and Aleph::HTList::is_empty().

◆ length()

template<class Net >
size_t Aleph::FlowPath< Net >::length ( ) const
inlinenoexcept

Get path length (number of arcs).

Returns
Number of arcs in the path.
Exceptions
none
Note
Complexity: O(1)
Thread safety: Thread-safe for read-only access.
Exception safety: noexcept

Definition at line 746 of file tpl_maxflow.H.

References Aleph::FlowPath< Net >::arcs, and Aleph::HTList::size().

Member Data Documentation

◆ arcs

template<class Net >
DynList<Arc *> Aleph::FlowPath< Net >::arcs

Arcs in the path (source to sink order)

Definition at line 726 of file tpl_maxflow.H.

Referenced by Aleph::decompose_flow(), Aleph::FlowPath< Net >::is_empty(), and Aleph::FlowPath< Net >::length().

◆ flow

template<class Net >
Flow_Type Aleph::FlowPath< Net >::flow {0}

Flow on this path.

Definition at line 728 of file tpl_maxflow.H.

Referenced by Aleph::decompose_flow().

◆ nodes

template<class Net >
DynList<Node *> Aleph::FlowPath< Net >::nodes

Nodes in the path.

Definition at line 727 of file tpl_maxflow.H.

Referenced by Aleph::decompose_flow().


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