From 933970ba647117d0c5fe1f4d6c6e66429c2e3ce2 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Wed, 29 Apr 2020 19:51:28 +1000 Subject: More fine refactoring --- src/directed_graphs.ads | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/directed_graphs.ads') diff --git a/src/directed_graphs.ads b/src/directed_graphs.ads index 7039d76..c4d48f7 100644 --- a/src/directed_graphs.ads +++ b/src/directed_graphs.ads @@ -560,14 +560,18 @@ package Directed_Graphs is + -- Iterates through all Nodes in the Graph in order of Node_Type. function Iterate (Container : in Graph) return Graph_Iterator_Interfaces.Reversible_Iterator'Class; + -- Iterates through all reachable Nodes in the subgraph in order + -- of Node_Type. Note that this is NOT the same as the order of + -- either breadth first or depth first search. function Iterate_Subgraph (Container : in Graph; Position : in Cursor) - return Graph_Iterator_Interfaces.Forward_Iterator'Class; + return Graph_Iterator_Interfaces.Reversible_Iterator'Class; function First (Container : in Graph) @@ -627,9 +631,8 @@ private (Index_Type => Positive, Element_Type => Node_Type); - function "=" - (Left, Right : in Node_Vectors.Vector) - return Boolean renames Node_Vectors."="; + use type Node_Vectors.Vector; + use type Ada.Containers.Count_Type; package Node_Sort is new Node_Vectors.Generic_Sorting; -- cgit