OOFEM 3.0
Loading...
Searching...
No Matches
oofem::SloanLevelStructure Class Reference

#include <sloanlevelstruct.h>

Collaboration diagram for oofem::SloanLevelStructure:

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.
IntArraygiveLevel (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

SloanGraphGraph
 Reference to corresponding graph.
int Root
 Root node of level structure.
int End
 End node of root structure.
std::vector< IntArrayStructure
 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.

Detailed Description

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.

Author
Milan Jirasek
Borek Patzak

Definition at line 51 of file sloanlevelstruct.h.

Constructor & Destructor Documentation

◆ SloanLevelStructure()

oofem::SloanLevelStructure::SloanLevelStructure ( SloanGraph * graph,
int root )
inline

Creates new level structure assignment to graph, with root being the root node.

Definition at line 69 of file sloanlevelstruct.h.

References Depth, End, Graph, Root, Structure, and Width.

◆ ~SloanLevelStructure()

oofem::SloanLevelStructure::~SloanLevelStructure ( )

Destructor.

Definition at line 47 of file sloanlevelstruct.C.

References destroyLevels().

Member Function Documentation

◆ computeDepth()

void oofem::SloanLevelStructure::computeDepth ( )
private

Computes depth of receiver.

Definition at line 96 of file sloanlevelstruct.C.

References Depth, formYourself(), and Structure.

Referenced by giveDepth().

◆ computeWidth()

void oofem::SloanLevelStructure::computeWidth ( )
private

Computes the Width of receiver.

Definition at line 103 of file sloanlevelstruct.C.

References giveDepth(), giveLevel(), and Width.

Referenced by giveWidth().

◆ destroyLevels()

void oofem::SloanLevelStructure::destroyLevels ( )

Destroys all levels.

Definition at line 53 of file sloanlevelstruct.C.

References Structure.

Referenced by formYourself(), and ~SloanLevelStructure().

◆ formYourself()

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.

Returns
Zero if assembly aborted due to width limit, positive value otherwise.

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().

◆ giveDepth()

◆ giveEnd()

int oofem::SloanLevelStructure::giveEnd ( )
inline

Returns the end node of receiver.

Definition at line 111 of file sloanlevelstruct.h.

References End.

◆ giveLevel()

IntArray & oofem::SloanLevelStructure::giveLevel ( int num)

◆ giveRoot()

int oofem::SloanLevelStructure::giveRoot ( )
inline

Return root node of receiver.

Definition at line 113 of file sloanlevelstruct.h.

References Root.

◆ giveWidth()

int oofem::SloanLevelStructure::giveWidth ( )
inline

Returns the width of receiver.

Definition at line 99 of file sloanlevelstruct.h.

References computeWidth(), and Width.

◆ setEnd()

void oofem::SloanLevelStructure::setEnd ( int end)
inline

Sets the end node of receiver.

Definition at line 109 of file sloanlevelstruct.h.

References End.

Member Data Documentation

◆ Depth

int oofem::SloanLevelStructure::Depth
private

Depth of structure defined as number of levels.

Definition at line 63 of file sloanlevelstruct.h.

Referenced by computeDepth(), giveDepth(), and SloanLevelStructure().

◆ End

int oofem::SloanLevelStructure::End
private

End node of root structure.

Definition at line 59 of file sloanlevelstruct.h.

Referenced by giveEnd(), setEnd(), and SloanLevelStructure().

◆ Graph

SloanGraph* oofem::SloanLevelStructure::Graph
private

Reference to corresponding graph.

Definition at line 55 of file sloanlevelstruct.h.

Referenced by formYourself(), and SloanLevelStructure().

◆ Root

int oofem::SloanLevelStructure::Root
private

Root node of level structure.

Definition at line 57 of file sloanlevelstruct.h.

Referenced by formYourself(), giveRoot(), and SloanLevelStructure().

◆ Structure

std::vector< IntArray > oofem::SloanLevelStructure::Structure
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().

◆ Width

int oofem::SloanLevelStructure::Width
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().


The documentation for this class was generated from the following files:

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