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

#include <sloangraphnode.h>

Collaboration diagram for oofem::SloanGraphNode:

Public Types

enum  SloanGraphNode_StatusType { Inactive , Preactive , Active , Postactive }
 Status type definition. More...

Public Member Functions

 SloanGraphNode (SloanGraph *graph, int numOld)
 Creates node belonging to given graph with given old number.
 ~SloanGraphNode ()
 Destructor.
void addNeighbor (int neighbor)
int giveNewNumber ()
 Returns new number of receiver.
int giveOldNumber ()
 Returns old number of receiver.
SloanGraphNode_StatusType giveStatus ()
 Returns receiver status.
int giveDegree ()
 Return the receiver's degree.
int giveDistance ()
 Returns distance of receiver.
int givePriority ()
 Returns priority of receiver.
std ::list< int > & giveNeighborList ()
 Returns the neighbor list of receiver.
void assignOldNumber ()
 sets new number equal to old one.
void setDistance (int d)
 Sets the receiver distance to given number.
void setPriority (int p)
 Sets the receiver priority to given value.
void setStatus (SloanGraphNode_StatusType s)
 Sets the status of receiver to given value.
void setNewNumber (int n)
 Sets the new number of receiver.
void increasePriorityBy (int p)
 Increases the priority of receiver by given value.
int computeProfileHeight ()

Private Attributes

SloanGraphgraph
 Associated graph structure, to which node belongs.
int NumberOld
 Old (original) number.
int NumberNew
 New (optimized) number.
SloanGraphNode_StatusType nodeStatus
 Status of node.
int Degree
 Node degree (number of adjacent edges).
int Distance
 Node distance.
int Priority
 Node priority.
std ::list< int > neighborList
 List of neighbouring nodes (represent graph edges).

Detailed Description

Class representing node in undirected graph, used by Sloan profile optimizer. Node keeps its old and new number, status, degree, distance and corresponding priority. The list of neighbouring nodes is also kept.

Author
Milan Jirasek
Borek Patzak

Definition at line 52 of file sloangraphnode.h.

Member Enumeration Documentation

◆ SloanGraphNode_StatusType

Status type definition.

Enumerator
Inactive 
Preactive 
Active 
Postactive 

Definition at line 56 of file sloangraphnode.h.

Constructor & Destructor Documentation

◆ SloanGraphNode()

oofem::SloanGraphNode::SloanGraphNode ( SloanGraph * graph,
int numOld )

Creates node belonging to given graph with given old number.

Definition at line 43 of file sloangraphnode.C.

References Degree, Distance, graph, Inactive, neighborList, nodeStatus, NumberNew, NumberOld, and Priority.

◆ ~SloanGraphNode()

oofem::SloanGraphNode::~SloanGraphNode ( )

Destructor.

Definition at line 54 of file sloangraphnode.C.

Member Function Documentation

◆ addNeighbor()

void oofem::SloanGraphNode::addNeighbor ( int neighbor)

Add neighbouring node to corresponding list. The entry is added only if not exist before, the Degree member is updated accordingly.

Definition at line 57 of file sloangraphnode.C.

References Degree, and neighborList.

◆ assignOldNumber()

void oofem::SloanGraphNode::assignOldNumber ( )
inline

sets new number equal to old one.

Definition at line 104 of file sloangraphnode.h.

References NumberNew, and NumberOld.

◆ computeProfileHeight()

int oofem::SloanGraphNode::computeProfileHeight ( )

Computes the profile height corresponding to receiver from current new and old numbers.

Definition at line 70 of file sloangraphnode.C.

References graph, oofem::min(), neighborList, and NumberNew.

◆ giveDegree()

int oofem::SloanGraphNode::giveDegree ( )
inline

Return the receiver's degree.

Definition at line 96 of file sloangraphnode.h.

References Degree.

◆ giveDistance()

int oofem::SloanGraphNode::giveDistance ( )
inline

Returns distance of receiver.

Definition at line 98 of file sloangraphnode.h.

References Distance.

◆ giveNeighborList()

std ::list< int > & oofem::SloanGraphNode::giveNeighborList ( )
inline

Returns the neighbor list of receiver.

Definition at line 102 of file sloangraphnode.h.

References neighborList.

Referenced by oofem::SloanGraph::insertNeigborsOf(), and oofem::SloanGraph::modifyPriorityAround().

◆ giveNewNumber()

int oofem::SloanGraphNode::giveNewNumber ( )
inline

Returns new number of receiver.

Definition at line 90 of file sloangraphnode.h.

References NumberNew.

◆ giveOldNumber()

int oofem::SloanGraphNode::giveOldNumber ( )
inline

Returns old number of receiver.

Definition at line 92 of file sloangraphnode.h.

References NumberOld.

◆ givePriority()

int oofem::SloanGraphNode::givePriority ( )
inline

Returns priority of receiver.

Definition at line 100 of file sloangraphnode.h.

References Priority.

◆ giveStatus()

SloanGraphNode_StatusType oofem::SloanGraphNode::giveStatus ( )
inline

Returns receiver status.

Definition at line 94 of file sloangraphnode.h.

References nodeStatus.

Referenced by oofem::SloanGraph::assignNewNumbers(), and oofem::SloanGraph::modifyPriorityAround().

◆ increasePriorityBy()

void oofem::SloanGraphNode::increasePriorityBy ( int p)
inline

Increases the priority of receiver by given value.

Definition at line 115 of file sloangraphnode.h.

References Priority.

Referenced by oofem::SloanGraph::modifyPriorityAround().

◆ setDistance()

void oofem::SloanGraphNode::setDistance ( int d)
inline

Sets the receiver distance to given number.

Definition at line 107 of file sloangraphnode.h.

References Distance.

◆ setNewNumber()

void oofem::SloanGraphNode::setNewNumber ( int n)
inline

Sets the new number of receiver.

Definition at line 113 of file sloangraphnode.h.

References NumberNew.

Referenced by oofem::SloanGraph::assignNewNumbers().

◆ setPriority()

void oofem::SloanGraphNode::setPriority ( int p)
inline

Sets the receiver priority to given value.

Definition at line 109 of file sloangraphnode.h.

References Priority.

◆ setStatus()

void oofem::SloanGraphNode::setStatus ( SloanGraphNode_StatusType s)
inline

Sets the status of receiver to given value.

Definition at line 111 of file sloangraphnode.h.

References nodeStatus.

Referenced by oofem::SloanGraph::assignNewNumbers(), and oofem::SloanGraph::modifyPriorityAround().

Member Data Documentation

◆ Degree

int oofem::SloanGraphNode::Degree
private

Node degree (number of adjacent edges).

Definition at line 68 of file sloangraphnode.h.

Referenced by addNeighbor(), giveDegree(), and SloanGraphNode().

◆ Distance

int oofem::SloanGraphNode::Distance
private

Node distance.

Definition at line 70 of file sloangraphnode.h.

Referenced by giveDistance(), setDistance(), and SloanGraphNode().

◆ graph

SloanGraph* oofem::SloanGraphNode::graph
private

Associated graph structure, to which node belongs.

Definition at line 60 of file sloangraphnode.h.

Referenced by computeProfileHeight(), and SloanGraphNode().

◆ neighborList

std :: list< int > oofem::SloanGraphNode::neighborList
private

List of neighbouring nodes (represent graph edges).

Definition at line 74 of file sloangraphnode.h.

Referenced by addNeighbor(), computeProfileHeight(), giveNeighborList(), and SloanGraphNode().

◆ nodeStatus

SloanGraphNode_StatusType oofem::SloanGraphNode::nodeStatus
private

Status of node.

Definition at line 66 of file sloangraphnode.h.

Referenced by giveStatus(), setStatus(), and SloanGraphNode().

◆ NumberNew

int oofem::SloanGraphNode::NumberNew
private

New (optimized) number.

Definition at line 64 of file sloangraphnode.h.

Referenced by assignOldNumber(), computeProfileHeight(), giveNewNumber(), setNewNumber(), and SloanGraphNode().

◆ NumberOld

int oofem::SloanGraphNode::NumberOld
private

Old (original) number.

Definition at line 62 of file sloangraphnode.h.

Referenced by assignOldNumber(), giveOldNumber(), and SloanGraphNode().

◆ Priority

int oofem::SloanGraphNode::Priority
private

Node priority.

Definition at line 72 of file sloangraphnode.h.

Referenced by givePriority(), increasePriorityBy(), setPriority(), and SloanGraphNode().


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