Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::SimpleMaxFlow Class Reference

Detailed Description

Definition at line 33 of file max_flow.h.

#include <max_flow.h>

Public Types

enum  Status { OPTIMAL , POSSIBLE_OVERFLOW , BAD_INPUT , BAD_RESULT }
typedef int32_t NodeIndex
typedef int32_t ArcIndex
typedef int64_t FlowQuantity

Public Member Functions

 SimpleMaxFlow ()
 SimpleMaxFlow (const SimpleMaxFlow &)=delete
SimpleMaxFlowoperator= (const SimpleMaxFlow &)=delete
ArcIndex AddArcWithCapacity (NodeIndex tail, NodeIndex head, FlowQuantity capacity)
NodeIndex NumNodes () const
ArcIndex NumArcs () const
NodeIndex Tail (ArcIndex arc) const
NodeIndex Head (ArcIndex arc) const
FlowQuantity Capacity (ArcIndex arc) const
Status Solve (NodeIndex source, NodeIndex sink)
FlowQuantity OptimalFlow () const
FlowQuantity Flow (ArcIndex arc) const
void GetSourceSideMinCut (std::vector< NodeIndex > *result)
void GetSinkSideMinCut (std::vector< NodeIndex > *result)
void SetArcCapacity (ArcIndex arc, FlowQuantity capacity)
FlowModelProto CreateFlowModelProto (NodeIndex source, NodeIndex sink) const

Member Typedef Documentation

◆ ArcIndex

Definition at line 36 of file max_flow.h.

◆ FlowQuantity

Definition at line 37 of file max_flow.h.

◆ NodeIndex

Definition at line 35 of file max_flow.h.

Member Enumeration Documentation

◆ Status

Enumerator
OPTIMAL 
POSSIBLE_OVERFLOW 
BAD_INPUT 
BAD_RESULT 

Definition at line 71 of file max_flow.h.

Constructor & Destructor Documentation

◆ SimpleMaxFlow() [1/2]

operations_research::SimpleMaxFlow::SimpleMaxFlow ( )

Definition at line 25 of file max_flow.cc.

◆ SimpleMaxFlow() [2/2]

operations_research::SimpleMaxFlow::SimpleMaxFlow ( const SimpleMaxFlow & )
delete

Member Function Documentation

◆ AddArcWithCapacity()

SimpleMaxFlow::ArcIndex operations_research::SimpleMaxFlow::AddArcWithCapacity ( NodeIndex tail,
NodeIndex head,
FlowQuantity capacity )

Definition at line 27 of file max_flow.cc.

◆ Capacity()

SimpleMaxFlow::FlowQuantity operations_research::SimpleMaxFlow::Capacity ( ArcIndex arc) const

Definition at line 52 of file max_flow.cc.

◆ CreateFlowModelProto()

FlowModelProto operations_research::SimpleMaxFlow::CreateFlowModelProto ( NodeIndex source,
NodeIndex sink ) const

Definition at line 129 of file max_flow.cc.

◆ Flow()

SimpleMaxFlow::FlowQuantity operations_research::SimpleMaxFlow::Flow ( ArcIndex arc) const

Definition at line 115 of file max_flow.cc.

◆ GetSinkSideMinCut()

void operations_research::SimpleMaxFlow::GetSinkSideMinCut ( std::vector< NodeIndex > * result)

Definition at line 124 of file max_flow.cc.

◆ GetSourceSideMinCut()

void operations_research::SimpleMaxFlow::GetSourceSideMinCut ( std::vector< NodeIndex > * result)

Definition at line 119 of file max_flow.cc.

◆ Head()

SimpleMaxFlow::NodeIndex operations_research::SimpleMaxFlow::Head ( ArcIndex arc) const

Definition at line 48 of file max_flow.cc.

◆ NumArcs()

SimpleMaxFlow::ArcIndex operations_research::SimpleMaxFlow::NumArcs ( ) const

Definition at line 40 of file max_flow.cc.

◆ NumNodes()

SimpleMaxFlow::NodeIndex operations_research::SimpleMaxFlow::NumNodes ( ) const

Definition at line 38 of file max_flow.cc.

◆ operator=()

SimpleMaxFlow & operations_research::SimpleMaxFlow::operator= ( const SimpleMaxFlow & )
delete

◆ OptimalFlow()

SimpleMaxFlow::FlowQuantity operations_research::SimpleMaxFlow::OptimalFlow ( ) const

Definition at line 111 of file max_flow.cc.

◆ SetArcCapacity()

void operations_research::SimpleMaxFlow::SetArcCapacity ( ArcIndex arc,
FlowQuantity capacity )

Definition at line 56 of file max_flow.cc.

◆ Solve()

SimpleMaxFlow::Status operations_research::SimpleMaxFlow::Solve ( NodeIndex source,
NodeIndex sink )

Definition at line 60 of file max_flow.cc.

◆ Tail()

SimpleMaxFlow::NodeIndex operations_research::SimpleMaxFlow::Tail ( ArcIndex arc) const

Definition at line 44 of file max_flow.cc.


The documentation for this class was generated from the following files: