1 -- Created on: 1992-10-16
2 -- Created by: Arnaud BOUZY
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 generic class ConnectedVerticesFromIterator from GraphTools
23 ---Purpose: In a graph, returns subsets of a list of vertices in
24 -- which all vertices are connected.
26 uses HArray1OfInteger from TColStd
28 class CVMap instantiates IndexedMap from TCollection
30 MapTransientHasher from TColStd);
32 class ConnectMap instantiates DataMap from TCollection
34 Integer from Standard,
35 MapTransientHasher from TColStd);
41 ---Purpose: Create an empty algorithm.
42 returns ConnectedVerticesFromIterator;
44 FromVertex (me : in out; V : Vertex);
45 ---Purpose: Add <V> as initial condition. This method is
46 -- cumulative. Use Perform method before visting the
47 -- result of the algorithm.
51 ---Purpose: Reset the algorithm. It may be reused with new
55 Perform (me : in out; G : Graph);
56 ---Purpose: Peform the algorithm in <G> from initial setted
61 ---Purpose: Returns TRUE if there are others subset of
62 -- connected vertices.
64 returns Boolean from Standard;
67 ---Purpose: Set the iterator to the next subset of connected
72 returns Integer from Standard;
73 ---Purpose: Returns number of vertices of the current subset
74 -- of connected vertices.
77 Value (me; index : Integer from Standard)
79 ---Purpose: Returns a vertex member of the current subset of
80 -- connected vertices.
84 Visit (me : in out; V : Vertex;
86 visited : in out ConnectMap from GraphTools)
87 ---Purpose: Recursively called to visit the vertices connected to
88 -- <avert> in <agraph>, with already visited vertices
95 initMap : CVMap from GraphTools;
96 tab : HArray1OfInteger from TColStd;
97 myCurrent : Integer from Standard;
99 end ConnectedVerticesFromIterator;