C++ Reference
C++ Reference: Graph
Detailed Description
template<typename Graph>
class operations_research::GenericMaxFlow< Graph >
Definition at line 144 of file max_flow.h.
Public Types | |
typedef Graph::NodeIndex | NodeIndex |
typedef Graph::ArcIndex | ArcIndex |
typedef Graph::OutgoingArcIterator | OutgoingArcIterator |
typedef Graph::OutgoingOrOppositeIncomingArcIterator | OutgoingOrOppositeIncomingArcIterator |
typedef Graph::IncomingArcIterator | IncomingArcIterator |
typedef ZVector< ArcIndex > | ArcIndexArray |
typedef NodeIndex | NodeHeight |
typedef ZVector< NodeHeight > | NodeHeightArray |
Public Member Functions | |
GenericMaxFlow (const Graph *graph, NodeIndex source, NodeIndex sink) | |
virtual | ~GenericMaxFlow () |
const Graph * | graph () const |
Status | status () const |
NodeIndex | GetSourceNodeIndex () const |
NodeIndex | GetSinkNodeIndex () const |
void | SetArcCapacity (ArcIndex arc, FlowQuantity new_capacity) |
void | SetArcFlow (ArcIndex arc, FlowQuantity new_flow) |
bool | Solve () |
FlowQuantity | GetOptimalFlow () const |
FlowQuantity | Flow (ArcIndex arc) const |
FlowQuantity | Capacity (ArcIndex arc) const |
void | GetSourceSideMinCut (std::vector< NodeIndex > *result) |
void | GetSinkSideMinCut (std::vector< NodeIndex > *result) |
bool | CheckInputConsistency () const |
bool | CheckResult () const |
bool | AugmentingPathExists () const |
void | SetUseGlobalUpdate (bool value) |
void | SetUseTwoPhaseAlgorithm (bool value) |
void | SetCheckInput (bool value) |
void | SetCheckResult (bool value) |
void | ProcessNodeByHeight (bool value) |
FlowModel | CreateFlowModel () |
Protected Attributes | |
const Graph * | graph_ |
QuantityArray | node_excess_ |
NodeHeightArray | node_potential_ |
QuantityArray | residual_arc_capacity_ |
ArcIndexArray | first_admissible_arc_ |
std::vector< NodeIndex > | active_nodes_ |
PriorityQueueWithRestrictedPush< NodeIndex, NodeHeight > | active_node_by_height_ |
NodeIndex | source_ |
NodeIndex | sink_ |
Status | status_ |
std::vector< bool > | node_in_bfs_queue_ |
std::vector< NodeIndex > | bfs_queue_ |
bool | use_global_update_ |
bool | use_two_phase_algorithm_ |
bool | process_node_by_height_ |
bool | check_input_ |
bool | check_result_ |
StatsGroup | stats_ |
Static Protected Attributes | |
static const FlowQuantity | kMaxFlowQuantity |
Member Typedef Documentation
◆ ArcIndex
typedef Graph::ArcIndex ArcIndex |
Definition at line 318 of file max_flow.h.
◆ ArcIndexArray
typedef ZVector<ArcIndex> ArcIndexArray |
Definition at line 323 of file max_flow.h.
◆ IncomingArcIterator
typedef Graph::IncomingArcIterator IncomingArcIterator |
Definition at line 322 of file max_flow.h.
◆ NodeHeight
typedef NodeIndex NodeHeight |
Definition at line 327 of file max_flow.h.
◆ NodeHeightArray
typedef ZVector<NodeHeight> NodeHeightArray |
Definition at line 328 of file max_flow.h.
◆ NodeIndex
typedef Graph::NodeIndex NodeIndex |
Definition at line 317 of file max_flow.h.
◆ OutgoingArcIterator
typedef Graph::OutgoingArcIterator OutgoingArcIterator |
Definition at line 319 of file max_flow.h.
◆ OutgoingOrOppositeIncomingArcIterator
typedef Graph::OutgoingOrOppositeIncomingArcIterator OutgoingOrOppositeIncomingArcIterator |
Definition at line 321 of file max_flow.h.
Constructor & Destructor Documentation
◆ GenericMaxFlow()
GenericMaxFlow | ( | const Graph * | graph, |
NodeIndex | source, | ||
NodeIndex | sink | ||
) |
◆ ~GenericMaxFlow()
|
inlinevirtual |
Definition at line 335 of file max_flow.h.
Member Function Documentation
◆ AugmentingPathExists()
bool AugmentingPathExists | ( | ) | const |
◆ Capacity()
|
inline |
Definition at line 375 of file max_flow.h.
◆ CheckInputConsistency()
bool CheckInputConsistency | ( | ) | const |
◆ CheckRelabelPrecondition()
|
protected |
◆ CheckResult()
bool CheckResult | ( | ) | const |
◆ ComputeReachableNodes()
◆ CreateFlowModel()
FlowModel CreateFlowModel | ( | ) |
◆ DebugString()
|
protected |
◆ Discharge()
|
protected |
◆ Flow()
|
inline |
Definition at line 365 of file max_flow.h.
◆ GetAndRemoveFirstActiveNode()
|
inlineprotected |
Definition at line 460 of file max_flow.h.
◆ GetOptimalFlow()
|
inline |
Definition at line 361 of file max_flow.h.
◆ GetSinkNodeIndex()
|
inline |
Definition at line 349 of file max_flow.h.
◆ GetSinkSideMinCut()
void GetSinkSideMinCut | ( | std::vector< NodeIndex > * | result | ) |
◆ GetSourceNodeIndex()
|
inline |
Definition at line 346 of file max_flow.h.
◆ GetSourceSideMinCut()
void GetSourceSideMinCut | ( | std::vector< NodeIndex > * | result | ) |
◆ GlobalUpdate()
|
protected |
◆ graph()
|
inline |
Definition at line 338 of file max_flow.h.
◆ Head()
Definition at line 532 of file max_flow.h.
◆ InitializeActiveNodeContainer()
|
protected |
◆ InitializePreflow()
|
protected |
◆ IsActive()
|
inlineprotected |
Definition at line 437 of file max_flow.h.
◆ IsAdmissible()
|
inlineprotected |
Definition at line 430 of file max_flow.h.
◆ IsArcDirect()
|
protected |
◆ IsArcValid()
|
protected |
◆ IsEmptyActiveNodeContainer()
|
inlineprotected |
Definition at line 477 of file max_flow.h.
◆ Opposite()
◆ ProcessNodeByHeight()
|
inline |
Definition at line 421 of file max_flow.h.
◆ PushActiveNode()
|
inlineprotected |
Definition at line 468 of file max_flow.h.
◆ PushFlow()
|
protected |
◆ PushFlowExcessBackToSource()
|
protected |
◆ Refine()
|
protected |
◆ RefineWithGlobalUpdate()
|
protected |
◆ Relabel()
|
protected |
◆ SaturateOutgoingArcsFromSource()
|
protected |
◆ SetArcCapacity()
void SetArcCapacity | ( | ArcIndex | arc, |
FlowQuantity | new_capacity | ||
) |
◆ SetArcFlow()
void SetArcFlow | ( | ArcIndex | arc, |
FlowQuantity | new_flow | ||
) |
◆ SetCapacityAndClearFlow()
|
inlineprotected |
Definition at line 442 of file max_flow.h.
◆ SetCheckInput()
|
inline |
Definition at line 419 of file max_flow.h.
◆ SetCheckResult()
|
inline |
Definition at line 420 of file max_flow.h.
◆ SetUseGlobalUpdate()
|
inline |
Definition at line 414 of file max_flow.h.
◆ SetUseTwoPhaseAlgorithm()
|
inline |
Definition at line 418 of file max_flow.h.
◆ Solve()
bool Solve | ( | ) |
◆ status()
|
inline |
Definition at line 343 of file max_flow.h.
◆ Tail()
Definition at line 533 of file max_flow.h.
Member Data Documentation
◆ active_node_by_height_
|
protected |
Definition at line 597 of file max_flow.h.
◆ active_nodes_
|
protected |
Definition at line 590 of file max_flow.h.
◆ bfs_queue_
|
protected |
Definition at line 611 of file max_flow.h.
◆ check_input_
|
protected |
Definition at line 634 of file max_flow.h.
◆ check_result_
|
protected |
Definition at line 638 of file max_flow.h.
◆ first_admissible_arc_
|
protected |
Definition at line 584 of file max_flow.h.
◆ graph_
|
protected |
Definition at line 547 of file max_flow.h.
◆ kMaxFlowQuantity
|
staticprotected |
Definition at line 544 of file max_flow.h.
◆ node_excess_
|
protected |
Definition at line 550 of file max_flow.h.
◆ node_in_bfs_queue_
|
protected |
Definition at line 610 of file max_flow.h.
◆ node_potential_
|
protected |
Definition at line 563 of file max_flow.h.
◆ process_node_by_height_
|
protected |
Definition at line 629 of file max_flow.h.
◆ residual_arc_capacity_
|
protected |
Definition at line 581 of file max_flow.h.
◆ sink_
|
protected |
Definition at line 603 of file max_flow.h.
◆ source_
|
protected |
Definition at line 600 of file max_flow.h.
◆ stats_
|
mutableprotected |
Definition at line 641 of file max_flow.h.
◆ status_
|
protected |
Definition at line 606 of file max_flow.h.
◆ use_global_update_
|
protected |
Definition at line 614 of file max_flow.h.
◆ use_two_phase_algorithm_
|
protected |
Definition at line 621 of file max_flow.h.
The documentation for this class was generated from the following file: