OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::SloanGraphNode Class Reference

Class representing node in undirected graph, used by Sloan profile optimizer. More...

#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. More...
 
 ~SloanGraphNode ()
 Destructor. More...
 
void addNeighbor (int neighbor)
 Add neighbouring node to corresponding list. More...
 
int giveNewNumber ()
 Returns new number of receiver. More...
 
int giveOldNumber ()
 Returns old number of receiver. More...
 
SloanGraphNode_StatusType giveStatus ()
 Returns receiver status. More...
 
int giveDegree ()
 Return the receiver's degree. More...
 
int giveDistance ()
 Returns distance of receiver. More...
 
int givePriority ()
 Returns priority of receiver. More...
 
std::list< int > & giveNeighborList ()
 Returns the neighbor list of receiver. More...
 
void assignOldNumber ()
 sets new number equal to old one. More...
 
void setDistance (int d)
 Sets the receiver distance to given number. More...
 
void setPriority (int p)
 Sets the receiver priority to given value. More...
 
void setStatus (SloanGraphNode_StatusType s)
 Sets the status of receiver to given value. More...
 
void setNewNumber (int n)
 Sets the new number of receiver. More...
 
void increasePriorityBy (int p)
 Increases the priority of receiver by given value. More...
 
int computeProfileHeight ()
 Computes the profile height corresponding to receiver from current new and old numbers. More...
 

Private Attributes

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

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

Status type definition.

Enumerator
Inactive 
Preactive 
Active 
Postactive 

Definition at line 56 of file sloangraphnode.h.

Constructor & Destructor Documentation

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, nodeStatus, NumberNew, NumberOld, and Priority.

oofem::SloanGraphNode::~SloanGraphNode ( )

Destructor.

Definition at line 54 of file sloangraphnode.C.

Member Function Documentation

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.

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

void oofem::SloanGraphNode::assignOldNumber ( )
inline

sets new number equal to old one.

Definition at line 104 of file sloangraphnode.h.

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 giveNewNumber(), oofem::SloanGraph::giveNode(), graph, oofem::min(), neighborList, and NumberNew.

int oofem::SloanGraphNode::giveDegree ( )
inline
int oofem::SloanGraphNode::giveDistance ( )
inline

Returns distance of receiver.

Definition at line 98 of file sloangraphnode.h.

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

Returns the neighbor list of receiver.

Definition at line 102 of file sloangraphnode.h.

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

int oofem::SloanGraphNode::giveNewNumber ( )
inline

Returns new number of receiver.

Definition at line 90 of file sloangraphnode.h.

Referenced by computeProfileHeight(), and oofem::SloanGraph::writeRenumberingTable().

int oofem::SloanGraphNode::giveOldNumber ( )
inline

Returns old number of receiver.

Definition at line 92 of file sloangraphnode.h.

int oofem::SloanGraphNode::givePriority ( )
inline

Returns priority of receiver.

Definition at line 100 of file sloangraphnode.h.

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

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

Increases the priority of receiver by given value.

Definition at line 115 of file sloangraphnode.h.

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

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

Sets the receiver distance to given number.

Definition at line 107 of file sloangraphnode.h.

Referenced by oofem::SloanGraph::evaluateNodeDistances(), and oofem::SloanGraph::initStatusAndPriority().

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

Sets the new number of receiver.

Definition at line 113 of file sloangraphnode.h.

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

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

Sets the receiver priority to given value.

Definition at line 109 of file sloangraphnode.h.

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

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

Member Data Documentation

int oofem::SloanGraphNode::Degree
private

Node degree (number of adjacent edges).

Definition at line 68 of file sloangraphnode.h.

Referenced by addNeighbor(), and SloanGraphNode().

int oofem::SloanGraphNode::Distance
private

Node distance.

Definition at line 70 of file sloangraphnode.h.

Referenced by SloanGraphNode().

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

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(), and computeProfileHeight().

SloanGraphNode_StatusType oofem::SloanGraphNode::nodeStatus
private

Status of node.

Definition at line 66 of file sloangraphnode.h.

Referenced by SloanGraphNode().

int oofem::SloanGraphNode::NumberNew
private

New (optimized) number.

Definition at line 64 of file sloangraphnode.h.

Referenced by computeProfileHeight(), and SloanGraphNode().

int oofem::SloanGraphNode::NumberOld
private

Old (original) number.

Definition at line 62 of file sloangraphnode.h.

Referenced by SloanGraphNode().

int oofem::SloanGraphNode::Priority
private

Node priority.

Definition at line 72 of file sloangraphnode.h.

Referenced by SloanGraphNode().


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

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:41 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011