|
OOFEM 3.0
|
#include <sloanlevelstruct.h>
Public Member Functions | |
| SloanLevelStructure (SloanGraph *graph, int root) | |
| Creates new level structure assignment to graph, with root being the root node. | |
| ~SloanLevelStructure () | |
| Destructor. | |
| void | destroyLevels () |
| Destroys all levels. | |
| int | formYourself (int limitWidth=-1) |
| int | giveDepth () |
| Returns the depth of receiver. | |
| int | giveWidth () |
| Returns the width of receiver. | |
| IntArray & | giveLevel (int num) |
| Returns the i-th level of receiver. | |
| void | setEnd (int end) |
| Sets the end node of receiver. | |
| int | giveEnd () |
| Returns the end node of receiver. | |
| int | giveRoot () |
| Return root node of receiver. | |
Private Member Functions | |
| void | computeDepth () |
| Computes depth of receiver. | |
| void | computeWidth () |
| Computes the Width of receiver. | |
Private Attributes | |
| SloanGraph * | Graph |
| Reference to corresponding graph. | |
| int | Root |
| Root node of level structure. | |
| int | End |
| End node of root structure. | |
| std::vector< IntArray > | Structure |
| Data representation of structure: List of arrays, one array for each level. | |
| int | Depth |
| Depth of structure defined as number of levels. | |
| int | Width |
| Width of structure defined as max number of nodes in all levels. | |
Class representing level structure for Sloan profile optimizer. This is partitioning of the nodes such that each node is assigned to one of the levels in accordance with its distance from a specified root node.
Definition at line 51 of file sloanlevelstruct.h.
|
inline |
| oofem::SloanLevelStructure::~SloanLevelStructure | ( | ) |
|
private |
Computes depth of receiver.
Definition at line 96 of file sloanlevelstruct.C.
References Depth, formYourself(), and Structure.
Referenced by giveDepth().
|
private |
Computes the Width of receiver.
Definition at line 103 of file sloanlevelstruct.C.
References giveDepth(), giveLevel(), and Width.
Referenced by giveWidth().
| void oofem::SloanLevelStructure::destroyLevels | ( | ) |
Destroys all levels.
Definition at line 53 of file sloanlevelstruct.C.
References Structure.
Referenced by formYourself(), and ~SloanLevelStructure().
| int oofem::SloanLevelStructure::formYourself | ( | int | limitWidth = -1 | ) |
Builds the level structure. The limitWidth parameter allows receiver build-up phase to be aborted during the assembly, when width of some level is greater than given value. Default value for limitWidth is -1 meaning no width limit. If assembly aborted, the destroyLevels() method is called.
Definition at line 59 of file sloanlevelstruct.C.
References oofem::IntArray::at(), destroyLevels(), oofem::IntArray::followedBy(), Graph, oofem::IntArray::isEmpty(), LEVEL_LIST_GROW_CHUNK, oofem::IntArray::resize(), Root, and Structure.
Referenced by computeDepth(), and giveLevel().
|
inline |
Returns the depth of receiver.
Definition at line 91 of file sloanlevelstruct.h.
References computeDepth(), and Depth.
Referenced by oofem::SloanGraph::computeTrueDiameter(), computeWidth(), oofem::SloanGraph::evaluateNodeDistances(), oofem::SloanGraph::extractCandidates(), oofem::SloanGraph::findBestRoot(), giveLevel(), and oofem::SloanGraph::initStatusAndPriority().
|
inline |
Returns the end node of receiver.
Definition at line 111 of file sloanlevelstruct.h.
References End.
| IntArray & oofem::SloanLevelStructure::giveLevel | ( | int | num | ) |
Returns the i-th level of receiver.
Definition at line 115 of file sloanlevelstruct.C.
References formYourself(), giveDepth(), OOFEM_ERROR, and Structure.
Referenced by computeWidth(), oofem::SloanGraph::evaluateNodeDistances(), oofem::SloanGraph::extractCandidates(), and oofem::SloanGraph::initStatusAndPriority().
|
inline |
|
inline |
Returns the width of receiver.
Definition at line 99 of file sloanlevelstruct.h.
References computeWidth(), and Width.
|
inline |
|
private |
Depth of structure defined as number of levels.
Definition at line 63 of file sloanlevelstruct.h.
Referenced by computeDepth(), giveDepth(), and SloanLevelStructure().
|
private |
End node of root structure.
Definition at line 59 of file sloanlevelstruct.h.
Referenced by giveEnd(), setEnd(), and SloanLevelStructure().
|
private |
Reference to corresponding graph.
Definition at line 55 of file sloanlevelstruct.h.
Referenced by formYourself(), and SloanLevelStructure().
|
private |
Root node of level structure.
Definition at line 57 of file sloanlevelstruct.h.
Referenced by formYourself(), giveRoot(), and SloanLevelStructure().
|
private |
Data representation of structure: List of arrays, one array for each level.
Definition at line 61 of file sloanlevelstruct.h.
Referenced by computeDepth(), destroyLevels(), formYourself(), giveLevel(), and SloanLevelStructure().
|
private |
Width of structure defined as max number of nodes in all levels.
Definition at line 65 of file sloanlevelstruct.h.
Referenced by computeWidth(), giveWidth(), and SloanLevelStructure().