HOG2
Public Member Functions | Private Attributes | Friends | List of all members
edge Class Reference

Edge class for connections between node in a Graph. More...

#include <Graph.h>

Inheritance diagram for edge:
Inheritance graph
[legend]
Collaboration diagram for edge:
Collaboration graph
[legend]

Public Member Functions

 edge (unsigned int, unsigned int, double)
 
graph_objectClone () const
 
void SetLabelF (unsigned int index, double val)
 
void SetLabelL (unsigned int index, long val)
 
double GetLabelF (unsigned int index) const
 
long GetLabelL (unsigned int index) const
 
double GetWeight ()
 
void setWeight (double val)
 
unsigned int getFrom () const
 
unsigned int getTo () const
 
void setMarked (bool marked)
 
bool getMarked ()
 
int getEdgeNum () const
 
void Print (std::ostream &) const
 
- Public Member Functions inherited from graph_object
 graph_object ()
 
virtual ~graph_object ()
 
virtual double GetKey ()
 

Private Attributes

bool mark
 
unsigned int from
 
unsigned int to
 
unsigned int edgeNum
 
std::vector< labelValuelabel
 

Friends

class Graph
 

Additional Inherited Members

- Public Attributes inherited from graph_object
unsigned int key
 

Detailed Description

Edge class for connections between node in a Graph.

Definition at line 129 of file Graph.h.

Constructor & Destructor Documentation

◆ edge()

edge::edge ( unsigned int  f,
unsigned int  t,
double  w 
)

Definition at line 570 of file Graph.cpp.

References kEdgeWeight, and SetLabelF().

Referenced by Clone().

Member Function Documentation

◆ Clone()

graph_object* edge::Clone ( ) const
inlinevirtual

Implements graph_object.

Definition at line 132 of file Graph.h.

References edge(), from, GetLabelF(), kEdgeWeight, and to.

Referenced by Graph::cloneAll().

◆ getEdgeNum()

int edge::getEdgeNum ( ) const
inline

Definition at line 152 of file Graph.h.

References edgeNum.

Referenced by clusterUtil::EdgeEqual::operator()(), and clusterUtil::EdgeHash::operator()().

◆ getFrom()

unsigned int edge::getFrom ( ) const
inline

◆ GetLabelF()

double edge::GetLabelF ( unsigned int  index) const
inline

Definition at line 137 of file Graph.h.

References label, and MAXINT.

Referenced by Clone(), GetWeight(), and Print().

◆ GetLabelL()

long edge::GetLabelL ( unsigned int  index) const
inline

◆ getMarked()

bool edge::getMarked ( )
inline

Definition at line 150 of file Graph.h.

References mark.

Referenced by Prim().

◆ getTo()

unsigned int edge::getTo ( ) const
inline

◆ GetWeight()

double edge::GetWeight ( )
inline

◆ Print()

void edge::Print ( std::ostream &  ) const
virtual

Reimplemented from graph_object.

Definition at line 578 of file Graph.cpp.

References from, GetLabelF(), kEdgeWeight, and to.

Referenced by operator<<().

◆ SetLabelF()

void edge::SetLabelF ( unsigned int  index,
double  val 
)

Definition at line 583 of file Graph.cpp.

References labelValue::fval, label, and MAXINT.

Referenced by edge(), and setWeight().

◆ SetLabelL()

void edge::SetLabelL ( unsigned int  index,
long  val 
)

◆ setMarked()

void edge::setMarked ( bool  marked)
inline

◆ setWeight()

void edge::setWeight ( double  val)
inline

Definition at line 141 of file Graph.h.

References kEdgeWeight, and SetLabelF().

Referenced by RoadMap::RoadMap().

Friends And Related Function Documentation

◆ Graph

friend class Graph
friend

Definition at line 156 of file Graph.h.

Member Data Documentation

◆ edgeNum

unsigned int edge::edgeNum
private

Definition at line 161 of file Graph.h.

Referenced by Graph::AddEdge(), getEdgeNum(), and Graph::RemoveEdge().

◆ from

unsigned int edge::from
private

Definition at line 158 of file Graph.h.

Referenced by Clone(), getFrom(), Print(), and Graph::RemoveEdge().

◆ label

std::vector<labelValue> edge::label
private

Definition at line 163 of file Graph.h.

Referenced by GetLabelF(), GetLabelL(), SetLabelF(), and SetLabelL().

◆ mark

bool edge::mark
private

Definition at line 157 of file Graph.h.

Referenced by getMarked(), and setMarked().

◆ to

unsigned int edge::to
private

Definition at line 158 of file Graph.h.

Referenced by Clone(), getTo(), Print(), and Graph::RemoveEdge().


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