object

unweighted_undirected_graph(Dictionary)

Unweighted undirected graph predicates using a dictionary representation. Undirected edges are stored as two directed edges. The parametric object parameter is the dictionary to use for the graph representation.

Availability:
logtalk_load(graphs(loader))
Author: Paulo Moura
Version: 1:0:0
Date: 2026-02-20
Compilation flags:
static, context_switching_calls
Remarks:
(none)

Public predicates

degree/3

Unifies Degree with the number of edges incident to Vertex. Fails if Vertex is not in the graph.

Compilation flags:
static
Template:
degree(Vertex,Graph,Degree)
Mode and number of proofs:
degree(+vertex,+graph,-integer) - zero_or_one

is_connected/1

True iff the graph is connected (every vertex is reachable from every other vertex).

Compilation flags:
static
Template:
is_connected(Graph)
Mode and number of proofs:
is_connected(+graph) - zero_or_one

connected_components/2

Unifies Components with a list of connected components. Each component is a sorted list of vertices.

Compilation flags:
static
Template:
connected_components(Graph,Components)
Mode and number of proofs:
connected_components(+graph,-list(list(vertex))) - one

Protected predicates

(no local declarations; see entity ancestors if any)

Private predicates

(no local declarations; see entity ancestors if any)

Operators

(none)