OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
sloangraphnode.h
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #ifndef sloangraphnode_h
36 #define sloangraphnode_h
37 
38 #include <list>
39 
40 #include "oofemcfg.h"
41 
42 namespace oofem {
43 class SloanGraph;
44 
52 class OOFEM_EXPORT SloanGraphNode
53 {
54 public:
56  enum SloanGraphNode_StatusType { Inactive, Preactive, Active, Postactive };
57 
58 private:
62  int NumberOld;
64  int NumberNew;
68  int Degree;
70  int Distance;
72  int Priority;
74  std :: list< int >neighborList;
75 
76 public:
78  SloanGraphNode(SloanGraph * graph, int numOld);
80  ~SloanGraphNode();
81 
87  void addNeighbor(int neighbor);
88 
90  int giveNewNumber() { return NumberNew; }
92  int giveOldNumber() { return NumberOld; }
94  SloanGraphNode_StatusType giveStatus() { return nodeStatus; }
96  int giveDegree() { return Degree; }
98  int giveDistance() { return Distance; }
100  int givePriority() { return Priority; }
102  std :: list< int > &giveNeighborList() { return neighborList; }
104  void assignOldNumber() { NumberNew = NumberOld; }
105 
107  void setDistance(int d) { Distance = d; }
109  void setPriority(int p) { Priority = p; }
111  void setStatus(SloanGraphNode_StatusType s) { nodeStatus = s; }
113  void setNewNumber(int n) { NumberNew = n; }
115  void increasePriorityBy(int p) { Priority += p; }
120  int computeProfileHeight();
121 };
122 } // end namespace oofem
123 #endif // sloangraphnode_h
void setPriority(int p)
Sets the receiver priority to given value.
SloanGraphNode_StatusType nodeStatus
Status of node.
int giveOldNumber()
Returns old number of receiver.
int giveNewNumber()
Returns new number of receiver.
int giveDegree()
Return the receiver&#39;s degree.
Class representing node in undirected graph, used by Sloan profile optimizer.
int givePriority()
Returns priority of receiver.
int giveDistance()
Returns distance of receiver.
SloanGraphNode_StatusType giveStatus()
Returns receiver status.
std::list< int > neighborList
List of neighbouring nodes (represent graph edges).
void setStatus(SloanGraphNode_StatusType s)
Sets the status of receiver to given value.
int Priority
Node priority.
int Degree
Node degree (number of adjacent edges).
SloanGraph * graph
Associated graph structure, to which node belongs.
Graph representing the undirected graph used for Sloan algorithm for symmetric matrix profile reducti...
Definition: sloangraph.h:77
void setDistance(int d)
Sets the receiver distance to given number.
std::list< int > & giveNeighborList()
Returns the neighbor list of receiver.
int Distance
Node distance.
int NumberOld
Old (original) number.
SloanGraphNode_StatusType
Status type definition.
void assignOldNumber()
sets new number equal to old one.
void increasePriorityBy(int p)
Increases the priority of receiver by given value.
void setNewNumber(int n)
Sets the new number of receiver.
the oofem namespace is to define a context or scope in which all oofem names are defined.
int NumberNew
New (optimized) number.

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:31 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011