pywrapgraph

View Source
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")

# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _pywrapgraph
else:
    import _pywrapgraph

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


class SimpleMaxFlow(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _pywrapgraph.SimpleMaxFlow_swiginit(self, _pywrapgraph.new_SimpleMaxFlow())

    def AddArcWithCapacity(self, tail: "operations_research::NodeIndex", head: "operations_research::NodeIndex", capacity: "operations_research::FlowQuantity") -> "operations_research::ArcIndex":
        return _pywrapgraph.SimpleMaxFlow_AddArcWithCapacity(self, tail, head, capacity)

    def NumNodes(self) -> "operations_research::NodeIndex":
        return _pywrapgraph.SimpleMaxFlow_NumNodes(self)

    def NumArcs(self) -> "operations_research::ArcIndex":
        return _pywrapgraph.SimpleMaxFlow_NumArcs(self)

    def Tail(self, arc: "operations_research::ArcIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.SimpleMaxFlow_Tail(self, arc)

    def Head(self, arc: "operations_research::ArcIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.SimpleMaxFlow_Head(self, arc)

    def Capacity(self, arc: "operations_research::ArcIndex") -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMaxFlow_Capacity(self, arc)
    OPTIMAL = _pywrapgraph.SimpleMaxFlow_OPTIMAL
    POSSIBLE_OVERFLOW = _pywrapgraph.SimpleMaxFlow_POSSIBLE_OVERFLOW
    BAD_INPUT = _pywrapgraph.SimpleMaxFlow_BAD_INPUT
    BAD_RESULT = _pywrapgraph.SimpleMaxFlow_BAD_RESULT

    def Solve(self, source: "operations_research::NodeIndex", sink: "operations_research::NodeIndex") -> "operations_research::SimpleMaxFlow::Status":
        return _pywrapgraph.SimpleMaxFlow_Solve(self, source, sink)

    def OptimalFlow(self) -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMaxFlow_OptimalFlow(self)

    def Flow(self, arc: "operations_research::ArcIndex") -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMaxFlow_Flow(self, arc)

    def GetSourceSideMinCut(self) -> "void":
        return _pywrapgraph.SimpleMaxFlow_GetSourceSideMinCut(self)

    def GetSinkSideMinCut(self) -> "void":
        return _pywrapgraph.SimpleMaxFlow_GetSinkSideMinCut(self)

    def SetArcCapacity(self, arc: "operations_research::ArcIndex", capacity: "operations_research::FlowQuantity") -> "void":
        return _pywrapgraph.SimpleMaxFlow_SetArcCapacity(self, arc, capacity)
    __swig_destroy__ = _pywrapgraph.delete_SimpleMaxFlow

# Register SimpleMaxFlow in _pywrapgraph:
_pywrapgraph.SimpleMaxFlow_swigregister(SimpleMaxFlow)

class MinCostFlowBase(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    NOT_SOLVED = _pywrapgraph.MinCostFlowBase_NOT_SOLVED
    OPTIMAL = _pywrapgraph.MinCostFlowBase_OPTIMAL
    FEASIBLE = _pywrapgraph.MinCostFlowBase_FEASIBLE
    INFEASIBLE = _pywrapgraph.MinCostFlowBase_INFEASIBLE
    UNBALANCED = _pywrapgraph.MinCostFlowBase_UNBALANCED
    BAD_RESULT = _pywrapgraph.MinCostFlowBase_BAD_RESULT
    BAD_COST_RANGE = _pywrapgraph.MinCostFlowBase_BAD_COST_RANGE

    def __init__(self):
        _pywrapgraph.MinCostFlowBase_swiginit(self, _pywrapgraph.new_MinCostFlowBase())
    __swig_destroy__ = _pywrapgraph.delete_MinCostFlowBase

# Register MinCostFlowBase in _pywrapgraph:
_pywrapgraph.MinCostFlowBase_swigregister(MinCostFlowBase)

class SimpleMinCostFlow(MinCostFlowBase):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, reserve_num_nodes: "operations_research::NodeIndex"=0, reserve_num_arcs: "operations_research::ArcIndex"=0):
        _pywrapgraph.SimpleMinCostFlow_swiginit(self, _pywrapgraph.new_SimpleMinCostFlow(reserve_num_nodes, reserve_num_arcs))

    def AddArcWithCapacityAndUnitCost(self, tail: "operations_research::NodeIndex", head: "operations_research::NodeIndex", capacity: "operations_research::FlowQuantity", unit_cost: "operations_research::CostValue") -> "operations_research::ArcIndex":
        return _pywrapgraph.SimpleMinCostFlow_AddArcWithCapacityAndUnitCost(self, tail, head, capacity, unit_cost)

    def SetNodeSupply(self, node: "operations_research::NodeIndex", supply: "operations_research::FlowQuantity") -> "void":
        return _pywrapgraph.SimpleMinCostFlow_SetNodeSupply(self, node, supply)

    def Solve(self) -> "operations_research::MinCostFlowBase::Status":
        return _pywrapgraph.SimpleMinCostFlow_Solve(self)

    def SolveMaxFlowWithMinCost(self) -> "operations_research::MinCostFlowBase::Status":
        return _pywrapgraph.SimpleMinCostFlow_SolveMaxFlowWithMinCost(self)

    def OptimalCost(self) -> "operations_research::CostValue":
        return _pywrapgraph.SimpleMinCostFlow_OptimalCost(self)

    def MaximumFlow(self) -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMinCostFlow_MaximumFlow(self)

    def Flow(self, arc: "operations_research::ArcIndex") -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMinCostFlow_Flow(self, arc)

    def NumNodes(self) -> "operations_research::NodeIndex":
        return _pywrapgraph.SimpleMinCostFlow_NumNodes(self)

    def NumArcs(self) -> "operations_research::ArcIndex":
        return _pywrapgraph.SimpleMinCostFlow_NumArcs(self)

    def Tail(self, arc: "operations_research::ArcIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.SimpleMinCostFlow_Tail(self, arc)

    def Head(self, arc: "operations_research::ArcIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.SimpleMinCostFlow_Head(self, arc)

    def Capacity(self, arc: "operations_research::ArcIndex") -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMinCostFlow_Capacity(self, arc)

    def Supply(self, node: "operations_research::NodeIndex") -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMinCostFlow_Supply(self, node)

    def UnitCost(self, arc: "operations_research::ArcIndex") -> "operations_research::CostValue":
        return _pywrapgraph.SimpleMinCostFlow_UnitCost(self, arc)
    __swig_destroy__ = _pywrapgraph.delete_SimpleMinCostFlow

# Register SimpleMinCostFlow in _pywrapgraph:
_pywrapgraph.SimpleMinCostFlow_swigregister(SimpleMinCostFlow)

class LinearSumAssignment(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _pywrapgraph.LinearSumAssignment_swiginit(self, _pywrapgraph.new_LinearSumAssignment())

    def AddArcWithCost(self, left_node: "operations_research::NodeIndex", right_node: "operations_research::NodeIndex", cost: "operations_research::CostValue") -> "operations_research::ArcIndex":
        return _pywrapgraph.LinearSumAssignment_AddArcWithCost(self, left_node, right_node, cost)

    def NumNodes(self) -> "operations_research::NodeIndex":
        return _pywrapgraph.LinearSumAssignment_NumNodes(self)

    def NumArcs(self) -> "operations_research::ArcIndex":
        return _pywrapgraph.LinearSumAssignment_NumArcs(self)

    def LeftNode(self, arc: "operations_research::ArcIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.LinearSumAssignment_LeftNode(self, arc)

    def RightNode(self, arc: "operations_research::ArcIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.LinearSumAssignment_RightNode(self, arc)

    def Cost(self, arc: "operations_research::ArcIndex") -> "operations_research::CostValue":
        return _pywrapgraph.LinearSumAssignment_Cost(self, arc)
    OPTIMAL = _pywrapgraph.LinearSumAssignment_OPTIMAL
    INFEASIBLE = _pywrapgraph.LinearSumAssignment_INFEASIBLE
    POSSIBLE_OVERFLOW = _pywrapgraph.LinearSumAssignment_POSSIBLE_OVERFLOW

    def Solve(self) -> "operations_research::SimpleLinearSumAssignment::Status":
        return _pywrapgraph.LinearSumAssignment_Solve(self)

    def OptimalCost(self) -> "operations_research::CostValue":
        return _pywrapgraph.LinearSumAssignment_OptimalCost(self)

    def RightMate(self, left_node: "operations_research::NodeIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.LinearSumAssignment_RightMate(self, left_node)

    def AssignmentCost(self, left_node: "operations_research::NodeIndex") -> "operations_research::CostValue":
        return _pywrapgraph.LinearSumAssignment_AssignmentCost(self, left_node)
    __swig_destroy__ = _pywrapgraph.delete_LinearSumAssignment

# Register LinearSumAssignment in _pywrapgraph:
_pywrapgraph.LinearSumAssignment_swigregister(LinearSumAssignment)


def DijkstraShortestPath(node_count: "int", start_node: "int", end_node: "int", graph: "std::function< int64_t (int,int) >", disconnected_distance: "int64_t") -> "std::vector< int > *":
    return _pywrapgraph.DijkstraShortestPath(node_count, start_node, end_node, graph, disconnected_distance)

def BellmanFordShortestPath(node_count: "int", start_node: "int", end_node: "int", graph: "std::function< int64_t (int,int) >", disconnected_distance: "int64_t") -> "std::vector< int > *":
    return _pywrapgraph.BellmanFordShortestPath(node_count, start_node, end_node, graph, disconnected_distance)

def AStarShortestPath(node_count: "int", start_node: "int", end_node: "int", graph: "std::function< int64_t (int,int) >", heuristic: "std::function< int64_t (int) >", disconnected_distance: "int64_t") -> "std::vector< int > *":
    return _pywrapgraph.AStarShortestPath(node_count, start_node, end_node, graph, heuristic, disconnected_distance)
#   class SimpleMaxFlow:
View Source
class SimpleMaxFlow(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _pywrapgraph.SimpleMaxFlow_swiginit(self, _pywrapgraph.new_SimpleMaxFlow())

    def AddArcWithCapacity(self, tail: "operations_research::NodeIndex", head: "operations_research::NodeIndex", capacity: "operations_research::FlowQuantity") -> "operations_research::ArcIndex":
        return _pywrapgraph.SimpleMaxFlow_AddArcWithCapacity(self, tail, head, capacity)

    def NumNodes(self) -> "operations_research::NodeIndex":
        return _pywrapgraph.SimpleMaxFlow_NumNodes(self)

    def NumArcs(self) -> "operations_research::ArcIndex":
        return _pywrapgraph.SimpleMaxFlow_NumArcs(self)

    def Tail(self, arc: "operations_research::ArcIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.SimpleMaxFlow_Tail(self, arc)

    def Head(self, arc: "operations_research::ArcIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.SimpleMaxFlow_Head(self, arc)

    def Capacity(self, arc: "operations_research::ArcIndex") -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMaxFlow_Capacity(self, arc)
    OPTIMAL = _pywrapgraph.SimpleMaxFlow_OPTIMAL
    POSSIBLE_OVERFLOW = _pywrapgraph.SimpleMaxFlow_POSSIBLE_OVERFLOW
    BAD_INPUT = _pywrapgraph.SimpleMaxFlow_BAD_INPUT
    BAD_RESULT = _pywrapgraph.SimpleMaxFlow_BAD_RESULT

    def Solve(self, source: "operations_research::NodeIndex", sink: "operations_research::NodeIndex") -> "operations_research::SimpleMaxFlow::Status":
        return _pywrapgraph.SimpleMaxFlow_Solve(self, source, sink)

    def OptimalFlow(self) -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMaxFlow_OptimalFlow(self)

    def Flow(self, arc: "operations_research::ArcIndex") -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMaxFlow_Flow(self, arc)

    def GetSourceSideMinCut(self) -> "void":
        return _pywrapgraph.SimpleMaxFlow_GetSourceSideMinCut(self)

    def GetSinkSideMinCut(self) -> "void":
        return _pywrapgraph.SimpleMaxFlow_GetSinkSideMinCut(self)

    def SetArcCapacity(self, arc: "operations_research::ArcIndex", capacity: "operations_research::FlowQuantity") -> "void":
        return _pywrapgraph.SimpleMaxFlow_SetArcCapacity(self, arc, capacity)
    __swig_destroy__ = _pywrapgraph.delete_SimpleMaxFlow
#   SimpleMaxFlow()
View Source
    def __init__(self):
        _pywrapgraph.SimpleMaxFlow_swiginit(self, _pywrapgraph.new_SimpleMaxFlow())
#   thisown

The membership flag

#   def AddArcWithCapacity( self, tail: 'operations_research::NodeIndex', head: 'operations_research::NodeIndex', capacity: 'operations_research::FlowQuantity' ) -> 'operations_research::ArcIndex':
View Source
    def AddArcWithCapacity(self, tail: "operations_research::NodeIndex", head: "operations_research::NodeIndex", capacity: "operations_research::FlowQuantity") -> "operations_research::ArcIndex":
        return _pywrapgraph.SimpleMaxFlow_AddArcWithCapacity(self, tail, head, capacity)
#   def NumNodes(self) -> 'operations_research::NodeIndex':
View Source
    def NumNodes(self) -> "operations_research::NodeIndex":
        return _pywrapgraph.SimpleMaxFlow_NumNodes(self)
#   def NumArcs(self) -> 'operations_research::ArcIndex':
View Source
    def NumArcs(self) -> "operations_research::ArcIndex":
        return _pywrapgraph.SimpleMaxFlow_NumArcs(self)
#   def Tail( self, arc: 'operations_research::ArcIndex' ) -> 'operations_research::NodeIndex':
View Source
    def Tail(self, arc: "operations_research::ArcIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.SimpleMaxFlow_Tail(self, arc)
#   def Head( self, arc: 'operations_research::ArcIndex' ) -> 'operations_research::NodeIndex':
View Source
    def Head(self, arc: "operations_research::ArcIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.SimpleMaxFlow_Head(self, arc)
#   def Capacity( self, arc: 'operations_research::ArcIndex' ) -> 'operations_research::FlowQuantity':
View Source
    def Capacity(self, arc: "operations_research::ArcIndex") -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMaxFlow_Capacity(self, arc)
#   OPTIMAL = 0
#   POSSIBLE_OVERFLOW = 1
#   BAD_INPUT = 2
#   BAD_RESULT = 3
#   def Solve( self, source: 'operations_research::NodeIndex', sink: 'operations_research::NodeIndex' ) -> 'operations_research::SimpleMaxFlow::Status':
View Source
    def Solve(self, source: "operations_research::NodeIndex", sink: "operations_research::NodeIndex") -> "operations_research::SimpleMaxFlow::Status":
        return _pywrapgraph.SimpleMaxFlow_Solve(self, source, sink)
#   def OptimalFlow(self) -> 'operations_research::FlowQuantity':
View Source
    def OptimalFlow(self) -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMaxFlow_OptimalFlow(self)
#   def Flow( self, arc: 'operations_research::ArcIndex' ) -> 'operations_research::FlowQuantity':
View Source
    def Flow(self, arc: "operations_research::ArcIndex") -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMaxFlow_Flow(self, arc)
#   def GetSourceSideMinCut(self) -> 'void':
View Source
    def GetSourceSideMinCut(self) -> "void":
        return _pywrapgraph.SimpleMaxFlow_GetSourceSideMinCut(self)
#   def GetSinkSideMinCut(self) -> 'void':
View Source
    def GetSinkSideMinCut(self) -> "void":
        return _pywrapgraph.SimpleMaxFlow_GetSinkSideMinCut(self)
#   def SetArcCapacity( self, arc: 'operations_research::ArcIndex', capacity: 'operations_research::FlowQuantity' ) -> 'void':
View Source
    def SetArcCapacity(self, arc: "operations_research::ArcIndex", capacity: "operations_research::FlowQuantity") -> "void":
        return _pywrapgraph.SimpleMaxFlow_SetArcCapacity(self, arc, capacity)
#   class MinCostFlowBase:
View Source
class MinCostFlowBase(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    NOT_SOLVED = _pywrapgraph.MinCostFlowBase_NOT_SOLVED
    OPTIMAL = _pywrapgraph.MinCostFlowBase_OPTIMAL
    FEASIBLE = _pywrapgraph.MinCostFlowBase_FEASIBLE
    INFEASIBLE = _pywrapgraph.MinCostFlowBase_INFEASIBLE
    UNBALANCED = _pywrapgraph.MinCostFlowBase_UNBALANCED
    BAD_RESULT = _pywrapgraph.MinCostFlowBase_BAD_RESULT
    BAD_COST_RANGE = _pywrapgraph.MinCostFlowBase_BAD_COST_RANGE

    def __init__(self):
        _pywrapgraph.MinCostFlowBase_swiginit(self, _pywrapgraph.new_MinCostFlowBase())
    __swig_destroy__ = _pywrapgraph.delete_MinCostFlowBase
#   MinCostFlowBase()
View Source
    def __init__(self):
        _pywrapgraph.MinCostFlowBase_swiginit(self, _pywrapgraph.new_MinCostFlowBase())
#   thisown

The membership flag

#   NOT_SOLVED = 0
#   OPTIMAL = 1
#   FEASIBLE = 2
#   INFEASIBLE = 3
#   UNBALANCED = 4
#   BAD_RESULT = 5
#   BAD_COST_RANGE = 6
#   class SimpleMinCostFlow(MinCostFlowBase):
View Source
class SimpleMinCostFlow(MinCostFlowBase):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, reserve_num_nodes: "operations_research::NodeIndex"=0, reserve_num_arcs: "operations_research::ArcIndex"=0):
        _pywrapgraph.SimpleMinCostFlow_swiginit(self, _pywrapgraph.new_SimpleMinCostFlow(reserve_num_nodes, reserve_num_arcs))

    def AddArcWithCapacityAndUnitCost(self, tail: "operations_research::NodeIndex", head: "operations_research::NodeIndex", capacity: "operations_research::FlowQuantity", unit_cost: "operations_research::CostValue") -> "operations_research::ArcIndex":
        return _pywrapgraph.SimpleMinCostFlow_AddArcWithCapacityAndUnitCost(self, tail, head, capacity, unit_cost)

    def SetNodeSupply(self, node: "operations_research::NodeIndex", supply: "operations_research::FlowQuantity") -> "void":
        return _pywrapgraph.SimpleMinCostFlow_SetNodeSupply(self, node, supply)

    def Solve(self) -> "operations_research::MinCostFlowBase::Status":
        return _pywrapgraph.SimpleMinCostFlow_Solve(self)

    def SolveMaxFlowWithMinCost(self) -> "operations_research::MinCostFlowBase::Status":
        return _pywrapgraph.SimpleMinCostFlow_SolveMaxFlowWithMinCost(self)

    def OptimalCost(self) -> "operations_research::CostValue":
        return _pywrapgraph.SimpleMinCostFlow_OptimalCost(self)

    def MaximumFlow(self) -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMinCostFlow_MaximumFlow(self)

    def Flow(self, arc: "operations_research::ArcIndex") -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMinCostFlow_Flow(self, arc)

    def NumNodes(self) -> "operations_research::NodeIndex":
        return _pywrapgraph.SimpleMinCostFlow_NumNodes(self)

    def NumArcs(self) -> "operations_research::ArcIndex":
        return _pywrapgraph.SimpleMinCostFlow_NumArcs(self)

    def Tail(self, arc: "operations_research::ArcIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.SimpleMinCostFlow_Tail(self, arc)

    def Head(self, arc: "operations_research::ArcIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.SimpleMinCostFlow_Head(self, arc)

    def Capacity(self, arc: "operations_research::ArcIndex") -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMinCostFlow_Capacity(self, arc)

    def Supply(self, node: "operations_research::NodeIndex") -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMinCostFlow_Supply(self, node)

    def UnitCost(self, arc: "operations_research::ArcIndex") -> "operations_research::CostValue":
        return _pywrapgraph.SimpleMinCostFlow_UnitCost(self, arc)
    __swig_destroy__ = _pywrapgraph.delete_SimpleMinCostFlow
#   SimpleMinCostFlow( reserve_num_nodes: 'operations_research::NodeIndex' = 0, reserve_num_arcs: 'operations_research::ArcIndex' = 0 )
View Source
    def __init__(self, reserve_num_nodes: "operations_research::NodeIndex"=0, reserve_num_arcs: "operations_research::ArcIndex"=0):
        _pywrapgraph.SimpleMinCostFlow_swiginit(self, _pywrapgraph.new_SimpleMinCostFlow(reserve_num_nodes, reserve_num_arcs))
#   thisown

The membership flag

#   def AddArcWithCapacityAndUnitCost( self, tail: 'operations_research::NodeIndex', head: 'operations_research::NodeIndex', capacity: 'operations_research::FlowQuantity', unit_cost: 'operations_research::CostValue' ) -> 'operations_research::ArcIndex':
View Source
    def AddArcWithCapacityAndUnitCost(self, tail: "operations_research::NodeIndex", head: "operations_research::NodeIndex", capacity: "operations_research::FlowQuantity", unit_cost: "operations_research::CostValue") -> "operations_research::ArcIndex":
        return _pywrapgraph.SimpleMinCostFlow_AddArcWithCapacityAndUnitCost(self, tail, head, capacity, unit_cost)
#   def SetNodeSupply( self, node: 'operations_research::NodeIndex', supply: 'operations_research::FlowQuantity' ) -> 'void':
View Source
    def SetNodeSupply(self, node: "operations_research::NodeIndex", supply: "operations_research::FlowQuantity") -> "void":
        return _pywrapgraph.SimpleMinCostFlow_SetNodeSupply(self, node, supply)
#   def Solve(self) -> 'operations_research::MinCostFlowBase::Status':
View Source
    def Solve(self) -> "operations_research::MinCostFlowBase::Status":
        return _pywrapgraph.SimpleMinCostFlow_Solve(self)
#   def SolveMaxFlowWithMinCost(self) -> 'operations_research::MinCostFlowBase::Status':
View Source
    def SolveMaxFlowWithMinCost(self) -> "operations_research::MinCostFlowBase::Status":
        return _pywrapgraph.SimpleMinCostFlow_SolveMaxFlowWithMinCost(self)
#   def OptimalCost(self) -> 'operations_research::CostValue':
View Source
    def OptimalCost(self) -> "operations_research::CostValue":
        return _pywrapgraph.SimpleMinCostFlow_OptimalCost(self)
#   def MaximumFlow(self) -> 'operations_research::FlowQuantity':
View Source
    def MaximumFlow(self) -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMinCostFlow_MaximumFlow(self)
#   def Flow( self, arc: 'operations_research::ArcIndex' ) -> 'operations_research::FlowQuantity':
View Source
    def Flow(self, arc: "operations_research::ArcIndex") -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMinCostFlow_Flow(self, arc)
#   def NumNodes(self) -> 'operations_research::NodeIndex':
View Source
    def NumNodes(self) -> "operations_research::NodeIndex":
        return _pywrapgraph.SimpleMinCostFlow_NumNodes(self)
#   def NumArcs(self) -> 'operations_research::ArcIndex':
View Source
    def NumArcs(self) -> "operations_research::ArcIndex":
        return _pywrapgraph.SimpleMinCostFlow_NumArcs(self)
#   def Tail( self, arc: 'operations_research::ArcIndex' ) -> 'operations_research::NodeIndex':
View Source
    def Tail(self, arc: "operations_research::ArcIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.SimpleMinCostFlow_Tail(self, arc)
#   def Head( self, arc: 'operations_research::ArcIndex' ) -> 'operations_research::NodeIndex':
View Source
    def Head(self, arc: "operations_research::ArcIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.SimpleMinCostFlow_Head(self, arc)
#   def Capacity( self, arc: 'operations_research::ArcIndex' ) -> 'operations_research::FlowQuantity':
View Source
    def Capacity(self, arc: "operations_research::ArcIndex") -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMinCostFlow_Capacity(self, arc)
#   def Supply( self, node: 'operations_research::NodeIndex' ) -> 'operations_research::FlowQuantity':
View Source
    def Supply(self, node: "operations_research::NodeIndex") -> "operations_research::FlowQuantity":
        return _pywrapgraph.SimpleMinCostFlow_Supply(self, node)
#   def UnitCost( self, arc: 'operations_research::ArcIndex' ) -> 'operations_research::CostValue':
View Source
    def UnitCost(self, arc: "operations_research::ArcIndex") -> "operations_research::CostValue":
        return _pywrapgraph.SimpleMinCostFlow_UnitCost(self, arc)
#   class LinearSumAssignment:
View Source
class LinearSumAssignment(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _pywrapgraph.LinearSumAssignment_swiginit(self, _pywrapgraph.new_LinearSumAssignment())

    def AddArcWithCost(self, left_node: "operations_research::NodeIndex", right_node: "operations_research::NodeIndex", cost: "operations_research::CostValue") -> "operations_research::ArcIndex":
        return _pywrapgraph.LinearSumAssignment_AddArcWithCost(self, left_node, right_node, cost)

    def NumNodes(self) -> "operations_research::NodeIndex":
        return _pywrapgraph.LinearSumAssignment_NumNodes(self)

    def NumArcs(self) -> "operations_research::ArcIndex":
        return _pywrapgraph.LinearSumAssignment_NumArcs(self)

    def LeftNode(self, arc: "operations_research::ArcIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.LinearSumAssignment_LeftNode(self, arc)

    def RightNode(self, arc: "operations_research::ArcIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.LinearSumAssignment_RightNode(self, arc)

    def Cost(self, arc: "operations_research::ArcIndex") -> "operations_research::CostValue":
        return _pywrapgraph.LinearSumAssignment_Cost(self, arc)
    OPTIMAL = _pywrapgraph.LinearSumAssignment_OPTIMAL
    INFEASIBLE = _pywrapgraph.LinearSumAssignment_INFEASIBLE
    POSSIBLE_OVERFLOW = _pywrapgraph.LinearSumAssignment_POSSIBLE_OVERFLOW

    def Solve(self) -> "operations_research::SimpleLinearSumAssignment::Status":
        return _pywrapgraph.LinearSumAssignment_Solve(self)

    def OptimalCost(self) -> "operations_research::CostValue":
        return _pywrapgraph.LinearSumAssignment_OptimalCost(self)

    def RightMate(self, left_node: "operations_research::NodeIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.LinearSumAssignment_RightMate(self, left_node)

    def AssignmentCost(self, left_node: "operations_research::NodeIndex") -> "operations_research::CostValue":
        return _pywrapgraph.LinearSumAssignment_AssignmentCost(self, left_node)
    __swig_destroy__ = _pywrapgraph.delete_LinearSumAssignment
#   LinearSumAssignment()
View Source
    def __init__(self):
        _pywrapgraph.LinearSumAssignment_swiginit(self, _pywrapgraph.new_LinearSumAssignment())
#   thisown

The membership flag

#   def AddArcWithCost( self, left_node: 'operations_research::NodeIndex', right_node: 'operations_research::NodeIndex', cost: 'operations_research::CostValue' ) -> 'operations_research::ArcIndex':
View Source
    def AddArcWithCost(self, left_node: "operations_research::NodeIndex", right_node: "operations_research::NodeIndex", cost: "operations_research::CostValue") -> "operations_research::ArcIndex":
        return _pywrapgraph.LinearSumAssignment_AddArcWithCost(self, left_node, right_node, cost)
#   def NumNodes(self) -> 'operations_research::NodeIndex':
View Source
    def NumNodes(self) -> "operations_research::NodeIndex":
        return _pywrapgraph.LinearSumAssignment_NumNodes(self)
#   def NumArcs(self) -> 'operations_research::ArcIndex':
View Source
    def NumArcs(self) -> "operations_research::ArcIndex":
        return _pywrapgraph.LinearSumAssignment_NumArcs(self)
#   def LeftNode( self, arc: 'operations_research::ArcIndex' ) -> 'operations_research::NodeIndex':
View Source
    def LeftNode(self, arc: "operations_research::ArcIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.LinearSumAssignment_LeftNode(self, arc)
#   def RightNode( self, arc: 'operations_research::ArcIndex' ) -> 'operations_research::NodeIndex':
View Source
    def RightNode(self, arc: "operations_research::ArcIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.LinearSumAssignment_RightNode(self, arc)
#   def Cost( self, arc: 'operations_research::ArcIndex' ) -> 'operations_research::CostValue':
View Source
    def Cost(self, arc: "operations_research::ArcIndex") -> "operations_research::CostValue":
        return _pywrapgraph.LinearSumAssignment_Cost(self, arc)
#   OPTIMAL = 0
#   INFEASIBLE = 1
#   POSSIBLE_OVERFLOW = 2
#   def Solve(self) -> 'operations_research::SimpleLinearSumAssignment::Status':
View Source
    def Solve(self) -> "operations_research::SimpleLinearSumAssignment::Status":
        return _pywrapgraph.LinearSumAssignment_Solve(self)
#   def OptimalCost(self) -> 'operations_research::CostValue':
View Source
    def OptimalCost(self) -> "operations_research::CostValue":
        return _pywrapgraph.LinearSumAssignment_OptimalCost(self)
#   def RightMate( self, left_node: 'operations_research::NodeIndex' ) -> 'operations_research::NodeIndex':
View Source
    def RightMate(self, left_node: "operations_research::NodeIndex") -> "operations_research::NodeIndex":
        return _pywrapgraph.LinearSumAssignment_RightMate(self, left_node)
#   def AssignmentCost( self, left_node: 'operations_research::NodeIndex' ) -> 'operations_research::CostValue':
View Source
    def AssignmentCost(self, left_node: "operations_research::NodeIndex") -> "operations_research::CostValue":
        return _pywrapgraph.LinearSumAssignment_AssignmentCost(self, left_node)
#   def DijkstraShortestPath( node_count: int, start_node: int, end_node: int, graph: 'std::function< int64_t (int,int) >', disconnected_distance: 'int64_t' ) -> 'std::vector< int > *':
View Source
def DijkstraShortestPath(node_count: "int", start_node: "int", end_node: "int", graph: "std::function< int64_t (int,int) >", disconnected_distance: "int64_t") -> "std::vector< int > *":
    return _pywrapgraph.DijkstraShortestPath(node_count, start_node, end_node, graph, disconnected_distance)
#   def BellmanFordShortestPath( node_count: int, start_node: int, end_node: int, graph: 'std::function< int64_t (int,int) >', disconnected_distance: 'int64_t' ) -> 'std::vector< int > *':
View Source
def BellmanFordShortestPath(node_count: "int", start_node: "int", end_node: "int", graph: "std::function< int64_t (int,int) >", disconnected_distance: "int64_t") -> "std::vector< int > *":
    return _pywrapgraph.BellmanFordShortestPath(node_count, start_node, end_node, graph, disconnected_distance)
#   def AStarShortestPath( node_count: int, start_node: int, end_node: int, graph: 'std::function< int64_t (int,int) >', heuristic: 'std::function< int64_t (int) >', disconnected_distance: 'int64_t' ) -> 'std::vector< int > *':
View Source
def AStarShortestPath(node_count: "int", start_node: "int", end_node: "int", graph: "std::function< int64_t (int,int) >", heuristic: "std::function< int64_t (int) >", disconnected_distance: "int64_t") -> "std::vector< int > *":
    return _pywrapgraph.AStarShortestPath(node_count, start_node, end_node, graph, heuristic, disconnected_distance)