category
flow_support(Dictionary)
Dictionary- Dictionary object used by the flow network.
Support predicates shared by the flow algorithm objects: terminal validation, residual graph traversal, path augmentation, and flow extraction. The category parameter is the dictionary object and must be the same one used to construct the flow network.
logtalk_load(flow_networks(loader))staticPublic predicates
(no local declarations; see entity ancestors if any)
Protected predicates
validate_terminals/3
Checks that the source and sink are distinct vertices of the network.
staticvalidate_terminals(Network,Source,Sink)validate_terminals(+compound,+ground,+ground) - 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)partner/2
Arc identifier of the opposite arc in a residual pair.
staticpartner(Id,Partner)partner(+integer,-integer) - oneadjacency/3
Outgoing residual arc identifiers of a vertex (empty list if none).
staticadjacency(Vertex,Network,Ids)adjacency(+ground,+compound,-list(integer)) - onebfs/5
Breadth-first search over arcs with positive residual capacity. Stop is either stop(Vertex) (stop as soon as the vertex is reached) or all. Info is a dictionary mapping each reached vertex to Level-ArcId where ArcId is the arc used to reach it (none for the source).
staticbfs(Network,Residual,Source,Stop,Info)bfs(+compound,+compound,+ground,+nonvar,-compound) - onebfs/6
As bfs/5, traversing only arcs whose residual capacity is at least Threshold.
staticbfs(Network,Residual,Source,Stop,Threshold,Info)bfs(+compound,+compound,+ground,+nonvar,+positive_integer,-compound) - oneaugment/4
Pushes the given amount of flow along a list of arc identifiers, updating the residual dictionary.
staticaugment(Ids,Amount,Residual0,Residual)augment(+list(integer),+integer,+compound,-compound) - oneaugment_arc/4
Pushes the given amount of flow along a single arc, updating the residual dictionary.
staticaugment_arc(Id,Amount,Residual0,Residual)augment_arc(+integer,+integer,+compound,-compound) - onepath_ids/4
Arc identifiers of the path from the BFS source to the given vertex (in source to vertex order).
staticpath_ids(Network,Vertex,Info,Ids)path_ids(+compound,+ground,+compound,-list(integer)) - onebottleneck/3
Minimum residual capacity along a non-empty list of arc identifiers.
staticbottleneck(Ids,Residual,Amount)bottleneck(+list(integer),+compound,-integer) - oneflow_list/3
Flow on each arc with positive flow as flow(ArcId, From, To, Amount) terms in arc input order. ArcId is the one-based input arc position.
staticflow_list(Network,Residual,Flow)flow_list(+compound,+compound,-list(compound)) - oneflow_cost/3
Total cost of the flow described by the residual dictionary.
staticflow_cost(Network,Residual,Cost)flow_cost(+compound,+compound,-integer) - onePrivate predicates
(no local declarations; see entity ancestors if any)
Operators
(none)