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

Statistics about a network flow. More...

#include <tpl_maxflow.H>

Public Member Functions

std::string to_string () const
 Format statistics as a string.
 
void print () const
 Print statistics to standard output.
 

Public Attributes

Flow_Type total_flow {0}
 Total flow value.
 
Flow_Type total_capacity {0}
 Sum of all capacities.
 
size_t num_saturated_arcs {0}
 Arcs with flow = capacity.
 
size_t num_empty_arcs {0}
 Arcs with flow = 0.
 
size_t num_partial_arcs {0}
 Arcs with 0 < flow < capacity.
 
double utilization {0.0}
 flow / capacity ratio
 

Detailed Description

template<typename Flow_Type>
struct Aleph::FlowStatistics< Flow_Type >

Statistics about a network flow.

Definition at line 1386 of file tpl_maxflow.H.

Member Function Documentation

◆ print()

template<typename Flow_Type >
void Aleph::FlowStatistics< Flow_Type >::print ( ) const
inline

Print statistics to standard output.

Formats the statistics and outputs to stdout.

Exceptions
std::bad_allocIf memory allocation fails while formatting output.
Note
Complexity: O(1)
Thread safety: Not thread-safe (writes to stdout).
Exception safety: Basic guarantee.

Definition at line 1428 of file tpl_maxflow.H.

References Aleph::FlowStatistics< Flow_Type >::to_string().

◆ to_string()

template<typename Flow_Type >
std::string Aleph::FlowStatistics< Flow_Type >::to_string ( ) const
inline

Format statistics as a string.

Builds a formatted string representation of the statistics.

Returns
Formatted string containing all statistics.
Exceptions
std::bad_allocIf memory allocation fails while building the string.
Note
Complexity: O(1)
Thread safety: Thread-safe for read-only access.
Exception safety: Basic guarantee.

Definition at line 1405 of file tpl_maxflow.H.

References Aleph::maps(), Aleph::FlowStatistics< Flow_Type >::num_empty_arcs, Aleph::FlowStatistics< Flow_Type >::num_partial_arcs, Aleph::FlowStatistics< Flow_Type >::num_saturated_arcs, Aleph::FlowStatistics< Flow_Type >::total_capacity, Aleph::FlowStatistics< Flow_Type >::total_flow, and Aleph::FlowStatistics< Flow_Type >::utilization.

Referenced by Aleph::FlowStatistics< Flow_Type >::print().

Member Data Documentation

◆ num_empty_arcs

template<typename Flow_Type >
size_t Aleph::FlowStatistics< Flow_Type >::num_empty_arcs {0}

Arcs with flow = 0.

Definition at line 1391 of file tpl_maxflow.H.

Referenced by Aleph::compute_flow_statistics(), and Aleph::FlowStatistics< Flow_Type >::to_string().

◆ num_partial_arcs

template<typename Flow_Type >
size_t Aleph::FlowStatistics< Flow_Type >::num_partial_arcs {0}

Arcs with 0 < flow < capacity.

Definition at line 1392 of file tpl_maxflow.H.

Referenced by Aleph::compute_flow_statistics(), and Aleph::FlowStatistics< Flow_Type >::to_string().

◆ num_saturated_arcs

template<typename Flow_Type >
size_t Aleph::FlowStatistics< Flow_Type >::num_saturated_arcs {0}

Arcs with flow = capacity.

Definition at line 1390 of file tpl_maxflow.H.

Referenced by Aleph::compute_flow_statistics(), and Aleph::FlowStatistics< Flow_Type >::to_string().

◆ total_capacity

template<typename Flow_Type >
Flow_Type Aleph::FlowStatistics< Flow_Type >::total_capacity {0}

Sum of all capacities.

Definition at line 1389 of file tpl_maxflow.H.

Referenced by Aleph::compute_flow_statistics(), and Aleph::FlowStatistics< Flow_Type >::to_string().

◆ total_flow

Total flow value.

Definition at line 1388 of file tpl_maxflow.H.

Referenced by Aleph::compute_flow_statistics(), and Aleph::FlowStatistics< Flow_Type >::to_string().

◆ utilization

template<typename Flow_Type >
double Aleph::FlowStatistics< Flow_Type >::utilization {0.0}

flow / capacity ratio

Definition at line 1393 of file tpl_maxflow.H.

Referenced by Aleph::compute_flow_statistics(), and Aleph::FlowStatistics< Flow_Type >::to_string().


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