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

Result of flow decomposition. More...

#include <tpl_maxflow.H>

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

Public Types

using Flow_Type = typename Net::Flow_Type
 

Public Member Functions

Flow_Type total_flow () const noexcept
 Total flow (sum of path flows).
 
size_t num_paths () const noexcept
 Number of paths.
 
size_t num_cycles () const noexcept
 Number of cycles.
 

Public Attributes

DynList< FlowPath< Net > > paths
 Source-to-sink paths.
 
DynList< FlowCycle< Net > > cycles
 Cycles (if any)
 

Detailed Description

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

Result of flow decomposition.

Contains all paths and cycles that compose the flow.

Template Parameters
NetNetwork type.

Definition at line 777 of file tpl_maxflow.H.

Member Typedef Documentation

◆ Flow_Type

Member Function Documentation

◆ num_cycles()

template<class Net >
size_t Aleph::FlowDecomposition< Net >::num_cycles ( ) const
inlinenoexcept

Number of cycles.

Returns
The count of decomposed cycles.
Exceptions
none
Note
Complexity: O(1)
Thread safety: Thread-safe for read-only access.
Exception safety: noexcept

Definition at line 815 of file tpl_maxflow.H.

References Aleph::FlowDecomposition< Net >::cycles, and Aleph::HTList::size().

◆ num_paths()

template<class Net >
size_t Aleph::FlowDecomposition< Net >::num_paths ( ) const
inlinenoexcept

Number of paths.

Returns
The count of decomposed paths.
Exceptions
none
Note
Complexity: O(1)
Thread safety: Thread-safe for read-only access.
Exception safety: noexcept

Definition at line 806 of file tpl_maxflow.H.

References Aleph::FlowDecomposition< Net >::paths, and Aleph::HTList::size().

◆ total_flow()

template<class Net >
Flow_Type Aleph::FlowDecomposition< Net >::total_flow ( ) const
inlinenoexcept

Total flow (sum of path flows).

Returns
Sum of flow values of all paths.
Exceptions
none
Note
Complexity: O(N) where N is the number of paths.
Thread safety: Thread-safe for read-only access.
Exception safety: noexcept

Definition at line 791 of file tpl_maxflow.H.

References Aleph::FlowDecomposition< Net >::paths, and Aleph::sum().

Member Data Documentation

◆ cycles

Cycles (if any)

Definition at line 782 of file tpl_maxflow.H.

Referenced by Aleph::decompose_flow(), and Aleph::FlowDecomposition< Net >::num_cycles().

◆ paths


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