OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Class representing level structure for Sloan profile optimizer. More...
#include <sloanlevelstruct.h>
Public Member Functions | |
SloanLevelStructure (SloanGraph *graph, int root) | |
Creates new level structure assignment to graph, with root being the root node. More... | |
~SloanLevelStructure () | |
Destructor. More... | |
void | destroyLevels () |
Destroys all levels. More... | |
int | formYourself (int limitWidth=-1) |
Builds the level structure. More... | |
int | giveDepth () |
Returns the depth of receiver. More... | |
int | giveWidth () |
Returns the width of receiver. More... | |
IntArray & | giveLevel (int num) |
Returns the i-th level of receiver. More... | |
void | setEnd (int end) |
Sets the end node of receiver. More... | |
int | giveEnd () |
Returns the end node of receiver. More... | |
int | giveRoot () |
Return root node of receiver. More... | |
Private Member Functions | |
void | computeDepth () |
Computes depth of receiver. More... | |
void | computeWidth () |
Computes the Width of receiver. More... | |
Private Attributes | |
SloanGraph * | Graph |
Reference to corresponding graph. More... | |
int | Root |
Root node of level structure. More... | |
int | End |
End node of root structure. More... | |
std::vector< IntArray > | Structure |
Data representation of structure: List of arrays, one array for each level. More... | |
int | Depth |
Depth of structure defined as number of levels. More... | |
int | Width |
Width of structure defined as max number of nodes in all levels. More... | |
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 |
Creates new level structure assignment to graph, with root being the root node.
Definition at line 69 of file sloanlevelstruct.h.
oofem::SloanLevelStructure::~SloanLevelStructure | ( | ) |
|
private |
Computes depth of receiver.
Definition at line 96 of file sloanlevelstruct.C.
References Depth, formYourself(), and Structure.
|
private |
Computes the Width of receiver.
Definition at line 103 of file sloanlevelstruct.C.
References giveDepth(), giveLevel(), oofem::IntArray::giveSize(), and Width.
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(), 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.
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.
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 |
Return root node of receiver.
Definition at line 113 of file sloanlevelstruct.h.
|
inline |
Returns the width of receiver.
Definition at line 99 of file sloanlevelstruct.h.
|
inline |
Sets the end node of receiver.
Definition at line 109 of file sloanlevelstruct.h.
|
private |
Depth of structure defined as number of levels.
Definition at line 63 of file sloanlevelstruct.h.
Referenced by computeDepth().
|
private |
End node of root structure.
Definition at line 59 of file sloanlevelstruct.h.
|
private |
Reference to corresponding graph.
Definition at line 55 of file sloanlevelstruct.h.
|
private |
Root node of level structure.
Definition at line 57 of file sloanlevelstruct.h.
Referenced by formYourself().
|
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(), and giveLevel().
|
private |
Width of structure defined as max number of nodes in all levels.
Definition at line 65 of file sloanlevelstruct.h.
Referenced by computeWidth().