category
weighted_graph_common(Dictionary)
Common weighted graph predicates shared by both weighted directed and weighted undirected graph objects. Uses self-dispatch to call object-specific predicates such as add_edge/5, delete_edge/5, and edges/2.
logtalk_load(graphs(loader))staticPublic predicates
(no local declarations; see entity ancestors if any)
Protected predicates
winsert_neighbor/4
Inserts a weighted neighbor into a sorted weighted neighbor list, replacing any existing entry for the same vertex.
staticwinsert_neighbor(WNeighbors,Vertex,Weight,NewWNeighbors)winsert_neighbor(+list,+vertex,+number,-list) - onewremove_neighbor/4
Removes a vertex from a sorted weighted neighbor list, unifying the weight. Fails if the vertex is not found.
staticwremove_neighbor(WNeighbors,Vertex,Weight,NewWNeighbors)wremove_neighbor(+list,+vertex,-number,-list) - zero_or_onewfind/3
Finds the weight associated with a vertex in a weighted neighbor list.
staticwfind(WNeighbors,Vertex,Weight)wfind(+list,+vertex,-number) - zero_or_onewremove_vertex_from_all/3
Removes a vertex from all weighted neighbor lists in a list of vertex-neighbors pairs.
staticwremove_vertex_from_all(Pairs,Vertex,NewPairs)wremove_vertex_from_all(+list(pair),+vertex,-list(pair)) - onerelax_neighbors/7
Relaxes neighbors during Dijkstra shortest path computation, updating distances and priority queue.
staticrelax_neighbors(WNeighbors,Vertex,Distance,Queue,Dist,NewQueue,NewDist)relax_neighbors(+list,+vertex,+number,+list,+dictionary,-list,-dictionary) - onepq_insert/3
Inserts an element into a sorted priority queue (list of Distance-Vertex pairs).
staticpq_insert(Queue,Item,NewQueue)pq_insert(+list,+pair,-list) - onePrivate predicates
(no local declarations; see entity ancestors if any)
Operators
(none)