protocol
unweighted_graph_protocol
Protocol for unweighted graph predicates, extending the common graph protocol with unweighted edge operations.
Availability:
logtalk_load(graphs(loader))Author: Paulo Moura
Version: 1:0:0
Date: 2026-02-19
Compilation flags:
staticExtends:
public graph_protocolRemarks:
(none)
Inherited public predicates:
add_edges/3 add_vertex/3 add_vertices/3 all_pairs_min_paths/2 all_pairs_min_predecessors/2 breadth_first_order/3 delete_edges/3 delete_vertex/3 delete_vertices/3 depth_first_order/3 edges/2 empty/1 has_path/3 is_bipartite/1 is_complete/1 is_sparse/1 max_path/5 min_distances/3 min_path/5 min_predecessors/3 neighbors/3 new/1 new/2 new/3 number_of_edges/2 number_of_vertices/2 path/3 reachable/3 vertices/2
Public predicates
edge/3
True iff there is an edge between Vertex1 and Vertex2 in Graph.
Compilation flags:
staticTemplate:
edge(Vertex1,Vertex2,Graph)Mode and number of proofs:
edge(+vertex,+vertex,+graph) - zero_or_oneadd_edge/4
Adds an edge between Vertex1 and Vertex2 to the graph.
Compilation flags:
staticTemplate:
add_edge(Graph,Vertex1,Vertex2,NewGraph)Mode and number of proofs:
add_edge(+graph,+vertex,+vertex,-graph) - onedelete_edge/4
Deletes the edge between Vertex1 and Vertex2 from the graph. The graph is unchanged if the edge does not exist.
Compilation flags:
staticTemplate:
delete_edge(Graph,Vertex1,Vertex2,NewGraph)Mode and number of proofs:
delete_edge(+graph,+vertex,+vertex,-graph) - onecomplement/2
Unifies NewGraph with the complement graph where there is an edge between all pairs of vertices not connected in the original graph.
Compilation flags:
staticTemplate:
complement(Graph,NewGraph)Mode and number of proofs:
complement(+graph,-graph) - oneProtected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)