b311480e |
1 | -- Created on: 1992-09-23 |
2 | -- Created by: Christian CAILLET |
3 | -- Copyright (c) 1992-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class Articulations from IFGraph inherits GraphContent |
18 | |
19 | ---Purpose : this class gives entities which are Articulation points |
20 | -- in a whole Model or in a sub-part |
21 | -- An Articulation Point divides the graph in two (or more) |
22 | -- disconnected sub-graphs |
23 | -- Identifying Articulation Points allows improving |
24 | -- efficiency of spliting a set of Entities into sub-sets |
25 | |
26 | uses Transient, HSequenceOfInteger, EntityIterator, Graph |
27 | |
28 | is |
29 | |
30 | Create (agraph : Graph; whole : Boolean) returns Articulations; |
31 | ---Purpose : creates Articulations to evaluate a Graph |
32 | -- whole True : works on the whole Model |
33 | -- whole False : remains empty, ready to work on a sub-part |
34 | |
35 | GetFromEntity (me : in out; ent : any Transient); |
36 | ---Purpose : adds an entity and its shared ones to the list |
37 | |
38 | GetFromIter (me : in out; iter : EntityIterator); |
39 | ---Purpose : adds a list of entities (as an iterator) |
40 | |
41 | ResetData (me : in out); |
42 | ---Purpose : Allows to restart on a new data set |
43 | |
44 | -- -- Results -- -- |
45 | -- More-Next-Value give Articulation points |
46 | |
47 | Evaluate (me : in out) is redefined; |
48 | ---Purpose : Evaluates the list of Articulation points |
49 | |
50 | Visit (me : in out; num : Integer) returns Integer is private; |
51 | ---Purpose : basic routine of computation |
52 | -- (see book Sedgewick "Algorithms", p 392) |
53 | |
54 | fields |
55 | |
56 | thegraph : Graph; |
57 | thenow : Integer; -- for Visit algorithm |
58 | thelist : HSequenceOfInteger; -- results from Visiting |
59 | |
60 | end Articulations; |