NodeWeight Class Reference

Valores de ponderación para los arboles. More...

#include <NodeWeight.h>

List of all members.

Public Member Functions

 NodeWeight ()
 NodeWeight (double weightValue, bool root=false)
 NodeWeight (double weightValue, bool root, int deepestNoNodes)
 NodeWeight (double potentialValue, double weightValue)
 NodeWeight (double potentialValue, double weightValue, bool root, int deepestNoNodes)
 ~NodeWeight ()
void setExternalId (const int &value)
int getExternalId () const
void setKeyroot (bool value)
bool isKeyroot () const
void setLeftmost (const int &value)
int getLeftmost () const
void setPotentialValue (const double &value)
double getPotentialValue () const
void setWeightValue (const double &value)
double getWeightValue () const
void setRoot (bool root)
bool isRoot () const
void setDeepestNoNodes (const int &value)
int getDeepestNoNodes () const

Private Attributes

bool keyroot
 Este valor es true si el nodo tiene nodos hermanos a la izquierda.
bool root
 Flag que asegura que es nodo asociado es la raiz de un arbol.
int externalId
 Valor de numeración para implementar algoritmo de postorden transversal.
double potentialValue
 Valor de doble presición con el cual se va a ponderar el nodo.
double weightValue
 Valor de doble presición con el cual se va a ponderar el nodo.
int leftmost
 El externalId del nodo descendiente sin hijos que se encuentra mas a la izquierda.
int deepestNoNodes


Detailed Description

Valores de ponderación para los arboles.

Author:
Néstor Aguirre
Fecha de creación : 2007-03-18

Todo:
Hay que separar los atributos involucrados en algoritmos de arboles, de los verdaderos valores de ponderación

Definition at line 34 of file NodeWeight.h.


Constructor & Destructor Documentation

NodeWeight::NodeWeight (  ) 

Definition at line 22 of file NodeWeight.cpp.

References deepestNoNodes, externalId, keyroot, leftmost, potentialValue, root, and weightValue.

00023 {
00024         root = false ;
00025         keyroot = false ;
00026         externalId = -1 ;
00027         potentialValue = INFINITY ;
00028         weightValue = INFINITY ;
00029         leftmost = -1 ;
00030         deepestNoNodes = -1 ;
00031 }

NodeWeight::NodeWeight ( double  weightValue,
bool  root = false 
)

Definition at line 41 of file NodeWeight.cpp.

References deepestNoNodes, externalId, keyroot, leftmost, and potentialValue.

00042 {
00043         this->root = root ;
00044         keyroot = false ;
00045         externalId = -1 ;
00046         potentialValue = INFINITY ;
00047         this->weightValue = weightValue ;
00048         leftmost = -1 ;
00049         deepestNoNodes = -1 ;
00050 }

NodeWeight::NodeWeight ( double  weightValue,
bool  root,
int  deepestNoNodes 
)

Definition at line 52 of file NodeWeight.cpp.

References externalId, keyroot, leftmost, and potentialValue.

00053 {
00054         this->root = root ;
00055         keyroot = false ;
00056         externalId = -1 ;
00057         potentialValue = INFINITY ;
00058         this->weightValue = weightValue ;
00059         leftmost = -1 ;
00060         this->deepestNoNodes = deepestNoNodes ;
00061 }

NodeWeight::NodeWeight ( double  potentialValue,
double  weightValue 
)

Definition at line 63 of file NodeWeight.cpp.

References deepestNoNodes, externalId, keyroot, leftmost, and root.

00063                                                                  {
00064         this->root = false ;
00065         keyroot = false ;
00066         externalId = -1 ;
00067         this->potentialValue = potentialValue ;
00068         this->weightValue = weightValue ;
00069         leftmost = -1 ;
00070         deepestNoNodes = -1 ;
00071 }

NodeWeight::NodeWeight ( double  potentialValue,
double  weightValue,
bool  root,
int  deepestNoNodes 
)

Definition at line 73 of file NodeWeight.cpp.

References externalId, keyroot, and leftmost.

00073                                                                                                 {
00074         this->root = root ;
00075         keyroot = false ;
00076         externalId = -1 ;
00077         this->potentialValue = potentialValue ;
00078         this->weightValue = weightValue ;
00079         leftmost = -1 ;
00080         this->deepestNoNodes = deepestNoNodes ;
00081 }

NodeWeight::~NodeWeight (  ) 

Definition at line 100 of file NodeWeight.cpp.

00101 {
00102 }


Member Function Documentation

void NodeWeight::setExternalId ( const int &  value  ) 

Definition at line 109 of file NodeWeight.cpp.

References externalId.

Referenced by Tree::postOrderRay().

00110 {
00111         externalId = value;
00112 }

int NodeWeight::getExternalId (  )  const

Definition at line 104 of file NodeWeight.cpp.

References externalId.

00105 {
00106         return externalId;
00107 }

void NodeWeight::setKeyroot ( bool  value  ) 

Definition at line 119 of file NodeWeight.cpp.

References keyroot.

Referenced by Tree::postOrderRay().

00120 {
00121         keyroot = value;
00122 }

bool NodeWeight::isKeyroot (  )  const

Definition at line 114 of file NodeWeight.cpp.

References keyroot.

Referenced by Tree::distance().

00115 {
00116         return keyroot;
00117 }

void NodeWeight::setLeftmost ( const int &  value  ) 

Definition at line 129 of file NodeWeight.cpp.

References leftmost.

Referenced by Tree::postOrderRay().

00130 {
00131         leftmost = value;
00132 }

int NodeWeight::getLeftmost (  )  const

Definition at line 124 of file NodeWeight.cpp.

References leftmost.

Referenced by Tree::distance().

00125 {
00126         return leftmost;
00127 }

void NodeWeight::setPotentialValue ( const double &  value  ) 

Definition at line 139 of file NodeWeight.cpp.

00140 {
00141         this->potentialValue = potentialValue ;
00142 }

double NodeWeight::getPotentialValue (  )  const

Definition at line 134 of file NodeWeight.cpp.

References potentialValue.

00135 {
00136         return potentialValue;
00137 }

void NodeWeight::setWeightValue ( const double &  value  ) 

Definition at line 149 of file NodeWeight.cpp.

00150 {
00151         this->weightValue = weightValue ;
00152 }

double NodeWeight::getWeightValue (  )  const

Definition at line 144 of file NodeWeight.cpp.

References weightValue.

Referenced by Tree::distance().

00145 {
00146         return weightValue;
00147 }

void NodeWeight::setRoot ( bool  root  ) 

Definition at line 154 of file NodeWeight.cpp.

00155 {
00156         this->root = root ;
00157 }

bool NodeWeight::isRoot (  )  const

Definition at line 159 of file NodeWeight.cpp.

References root.

00160 {
00161         return root ;
00162 }

void NodeWeight::setDeepestNoNodes ( const int &  value  ) 

Definition at line 169 of file NodeWeight.cpp.

References deepestNoNodes.

00170 {
00171         deepestNoNodes = value;
00172 }

int NodeWeight::getDeepestNoNodes (  )  const

Definition at line 164 of file NodeWeight.cpp.

References deepestNoNodes.

00165 {
00166         return deepestNoNodes ;
00167 }


Member Data Documentation

bool NodeWeight::keyroot [private]

Este valor es true si el nodo tiene nodos hermanos a la izquierda.

Definition at line 63 of file NodeWeight.h.

Referenced by isKeyroot(), NodeWeight(), and setKeyroot().

bool NodeWeight::root [private]

Flag que asegura que es nodo asociado es la raiz de un arbol.

Definition at line 64 of file NodeWeight.h.

Referenced by isRoot(), and NodeWeight().

int NodeWeight::externalId [private]

Valor de numeración para implementar algoritmo de postorden transversal.

Definition at line 65 of file NodeWeight.h.

Referenced by getExternalId(), NodeWeight(), and setExternalId().

double NodeWeight::potentialValue [private]

Valor de doble presición con el cual se va a ponderar el nodo.

Definition at line 66 of file NodeWeight.h.

Referenced by getPotentialValue(), and NodeWeight().

double NodeWeight::weightValue [private]

Valor de doble presición con el cual se va a ponderar el nodo.

Definition at line 67 of file NodeWeight.h.

Referenced by getWeightValue(), and NodeWeight().

int NodeWeight::leftmost [private]

El externalId del nodo descendiente sin hijos que se encuentra mas a la izquierda.

Definition at line 68 of file NodeWeight.h.

Referenced by getLeftmost(), NodeWeight(), and setLeftmost().

int NodeWeight::deepestNoNodes [private]

Este valor corresponde a la maxima distancia grafoteorica que puede existir entre un nodo y un descendiente suyo

Definition at line 69 of file NodeWeight.h.

Referenced by getDeepestNoNodes(), NodeWeight(), and setDeepestNoNodes().


The documentation for this class was generated from the following files:
Generated on Mon May 26 20:29:47 2008 for TARIS by  doxygen 1.5.4