OOFEM 3.0
Loading...
Searching...
No Matches
sloanlevelstruct.h
Go to the documentation of this file.
1/*
2 *
3 * ##### ##### ###### ###### ### ###
4 * ## ## ## ## ## ## ## ### ##
5 * ## ## ## ## #### #### ## # ##
6 * ## ## ## ## ## ## ## ##
7 * ## ## ## ## ## ## ## ##
8 * ##### ##### ## ###### ## ##
9 *
10 *
11 * OOFEM : Object Oriented Finite Element Code
12 *
13 * Copyright (C) 1993 - 2025 Borek Patzak
14 *
15 *
16 *
17 * Czech Technical University, Faculty of Civil Engineering,
18 * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19 *
20 * This library is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU Lesser General Public
22 * License as published by the Free Software Foundation; either
23 * version 2.1 of the License, or (at your option) any later version.
24 *
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28 * Lesser General Public License for more details.
29 *
30 * You should have received a copy of the GNU Lesser General Public
31 * License along with this library; if not, write to the Free Software
32 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33 */
34
35#ifndef sloanlevelstruct_h
36#define sloanlevelstruct_h
37
38#include "oofemenv.h"
39#include "intarray.h"
40
41namespace oofem {
42class SloanGraph;
43
52{
53private:
57 int Root;
59 int End;
61 std::vector< IntArray >Structure;
63 int Depth;
65 int Width;
66
67public:
70 {
71 Graph = graph;
72 Root = root;
73 End = 0;
74 Depth = Width = 0;
75 }
76
78
80 void destroyLevels();
88 int formYourself(int limitWidth = -1);
89
91 int giveDepth() {
92 if ( !Depth ) {
94 }
95
96 return Depth;
97 }
98
99 int giveWidth() {
100 if ( !Width ) {
101 computeWidth();
102 }
103
104 return Width;
105 }
106
107 IntArray &giveLevel(int num);
109 void setEnd(int end) { End = end; }
111 int giveEnd() { return End; }
113 int giveRoot() { return Root; }
114
115private:
117 void computeDepth();
119 void computeWidth();
120};
121} // end namespace oofem
122#endif // sloanlevelstruct_h
int Root
Root node of level structure.
int giveWidth()
Returns the width of receiver.
void setEnd(int end)
Sets the end node of receiver.
int Width
Width of structure defined as max number of nodes in all levels.
int giveRoot()
Return root node of receiver.
std::vector< IntArray > Structure
Data representation of structure: List of arrays, one array for each level.
SloanGraph * Graph
Reference to corresponding graph.
SloanLevelStructure(SloanGraph *graph, int root)
Creates new level structure assignment to graph, with root being the root node.
int giveEnd()
Returns the end node of receiver.
int Depth
Depth of structure defined as number of levels.
int End
End node of root structure.
void computeDepth()
Computes depth of receiver.
int giveDepth()
Returns the depth of receiver.
void computeWidth()
Computes the Width of receiver.
#define OOFEM_EXPORT
Definition oofemcfg.h:7

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011