protocol
max_flow_protocol
Maximum flow and minimum cut protocol.
logtalk_load(flow_networks(loader))staticPublic predicates
max_flow/5
Computes a maximum flow from Source to Sink. Flow is a list of flow(ArcId, From, To, Amount) terms with a positive amount, one per arc carrying flow, in the order of the network arcs. ArcId is the one-based position of the arc in the input list used to construct the network. Maximum flow currently requires zero lower bounds.
staticmax_flow(Network,Source,Sink,Value,Flow)max_flow(+compound,+ground,+ground,-integer,-list(compound)) - one_or_errorSource or Sink is not ground:instantiation_errorSource or Sink is not a vertex of the network:existence_error(vertex,Vertex)Source and Sink are the same vertex:consistency_error(distinct_vertices,Source,Sink)domain_error(zero_lower_bounds,Network)multi_source_max_flow/5
Computes a maximum flow from a non-empty set of distinct sources to a non-empty, disjoint set of distinct sinks. Flow uses the original network arc IDs and endpoints. Requires zero lower bounds.
staticmulti_source_max_flow(Network,Sources,Sinks,Value,Flow)multi_source_max_flow(+compound,+list(ground),+list(ground),-integer,-list(compound)) - one_or_errorinstantiation_errordomain_error(non_empty_terminal_set,Terminals)existence_error(vertex,Vertex)domain_error(unique_terminals,Terminals)consistency_error(disjoint_terminals,Sources,Sinks)domain_error(zero_lower_bounds,Network)node_capacity_max_flow/6
Computes a maximum flow subject to the given intermediate vertex capacities, represented as Vertex-Capacity pairs. Source and sink capacities are not constrained. Flow uses the original network arc IDs and endpoints. Requires zero lower bounds.
staticnode_capacity_max_flow(Network,Source,Sink,NodeCapacities,Value,Flow)node_capacity_max_flow(+compound,+ground,+ground,+list(pair),-integer,-list(compound)) - one_or_errorinstantiation_errordomain_error(non_negative_integer,Capacity)existence_error(vertex,Vertex)domain_error(intermediate_vertex,Vertex)domain_error(unique_node_capacities,Vertex)domain_error(zero_lower_bounds,Network)min_cut/5
Computes a minimum cut separating Source from Sink. Cut is a cut(SourceSide, SinkSide, Arcs) term where SourceSide and SinkSide are sorted lists of vertices and Arcs is the list of arc(From, To, Capacity) terms for the arcs with positive capacity going from the source side to the sink side. Value is both the maximum flow value and the capacity of the cut. Minimum cut currently requires zero lower bounds.
staticmin_cut(Network,Source,Sink,Value,Cut)min_cut(+compound,+ground,+ground,-integer,-compound) - one_or_errorSource or Sink is not ground:instantiation_errorSource or Sink is not a vertex of the network:existence_error(vertex,Vertex)Source and Sink are the same vertex:consistency_error(distinct_vertices,Source,Sink)domain_error(zero_lower_bounds,Network)sink_closest_min_cut/5
Computes the sink-closest minimum cut. Its source side contains exactly the vertices that cannot reach the sink in the final residual graph. Requires zero lower bounds.
staticsink_closest_min_cut(Network,Source,Sink,Value,Cut)sink_closest_min_cut(+compound,+ground,+ground,-integer,-compound) - one_or_errorSource or Sink is not ground:instantiation_errorSource or Sink is not a vertex of the network:existence_error(vertex,Vertex)Source and Sink are the same vertex:consistency_error(distinct_vertices,Source,Sink)domain_error(zero_lower_bounds,Network)unique_min_cut/4
Checks whether the minimum cut separating the given source and sink is unique. Unique is true or false. Requires zero lower bounds.
staticunique_min_cut(Network,Source,Sink,Unique)unique_min_cut(+compound,+ground,+ground,-boolean) - one_or_errorSource or Sink is not ground:instantiation_errorSource or Sink is not a vertex of the network:existence_error(vertex,Vertex)Source and Sink are the same vertex:consistency_error(distinct_vertices,Source,Sink)domain_error(zero_lower_bounds,Network)min_cuts/5
Enumerates all minimum cuts on backtracking as cut(SourceSide, SinkSide, Arcs) terms. Enumeration uses the strongly connected components of the final residual graph. Requires zero lower bounds.
staticmin_cuts(Network,Source,Sink,Value,Cut)min_cuts(+compound,+ground,+ground,-integer,-compound) - zero_or_more_or_errorSource or Sink is not ground:instantiation_errorSource or Sink is not a vertex of the network:existence_error(vertex,Vertex)Source and Sink are the same vertex:consistency_error(distinct_vertices,Source,Sink)domain_error(zero_lower_bounds,Network)Protected predicates
(none)
Private predicates
(none)
Operators
(none)