object
weighted_undirected_graph(Dictionary)
Weighted undirected graph predicates using a dictionary representation. Each edge is stored in both directions. Edge weights use a pair representation (Vertex-Weight in neighbor lists, (Vertex1-Vertex2)-Weight for edge lists). The parametric object parameter is the dictionary to use for the graph representation.
logtalk_load(graphs(loader))static, context_switching_callsPublic predicates
degree/3
Returns the degree (number of edges incident to the vertex) of Vertex in Graph.
staticdegree(Vertex,Graph,Degree)degree(+vertex,+graph,-integer) - zero_or_oneis_connected/1
True if Graph is connected (all vertices are reachable from any vertex).
staticis_connected(Graph)is_connected(+graph) - zero_or_oneconnected_components/2
Returns the list of connected components (each a list of vertices).
staticconnected_components(Graph,Components)connected_components(+graph,-list(list)) - onemin_tree/3
Constructs a minimum spanning tree and returns its total weight.
staticmin_tree(Graph,Tree,Cost)min_tree(+graph,-graph,-number) - zero_or_onemax_tree/3
Constructs a maximum spanning tree and returns its total weight.
staticmax_tree(Graph,Tree,Cost)max_tree(+graph,-graph,-number) - zero_or_oneProtected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)