Hierarchical Edge Bundle 1.0
Public Member Functions | Protected Attributes
Graph Class Reference

#include <Graph.h>

List of all members.

Public Member Functions

 Graph (void)
 ~Graph (void)
void AddVertex (VertexPtr vert)
VertexPtr GetVertexWithID (unsigned int id)
int GetNumberOfVertices ()
void RemoveVertexWithID (unsigned int id)
void RemoveVertex (Vertex &vert)
void SetRoot (int id)
VertexPtr GetRoot ()
HierarchyPtr GetHierarchyEdgeWithID (unsigned int id)
void AddHierarchicEdge (HierarchyPtr edge)
unsigned int GetNumberOfHiearchicEdges ()
HierarchyPtr GetHierarchyEdgeAt (unsigned int at)
RelationPtr GetRelationEdgeWithID (unsigned int id)
void AddRelationEdge (RelationPtr edge)
unsigned int GetNumberOfRelationEdges ()
RelationPtr GetRelationEdgeAt (unsigned int at)
void SetNumberOfHierarchies (int count)
int GetNumberOfHierarchies ()
void AddHierarchy (Hierarchy hierarchy)
void SetHierarchyAt (int level, Hierarchy hierarchy)
Hierarchy GetHierarchyAt (int level)
void RemoveHierarchy (int level)
std::vector< VertexPtrGetVertexPtrVectorFromIDVector (std::vector< unsigned int > ids)
void Calculate ()
void CalculateHierarchy ()
void CalculatePathToRoot ()
void CalculatePathToRoot (VertexPtr actPath, std::vector< unsigned int > path)
std::vector< unsigned int > CalculatePathOverLCA (RelationPtr edge)
std::vector< unsigned int > CalculatePathOverLCA (VertexPtr start, VertexPtr end)
std::vector< VertexPtrGetAllVerticesWithoutChild ()

Protected Attributes

std::map< unsigned int, VertexPtrm_vertices
std::map< unsigned int,
HierarchyPtr
m_hierarchyedges
std::map< unsigned int,
RelationPtr
m_relationedge
VertexPtr m_pkRoot
vector< Hierarchym_hierarchy

Detailed Description

This class provides methods for creating, editing and deleting graphs. Is possible to:


Constructor & Destructor Documentation

Graph::Graph ( void  )

standard constructor

Graph::~Graph ( void  )

standard deconstructor


Member Function Documentation

void Graph::AddHierarchicEdge ( HierarchyPtr  edge)

This method adds a hierarchy edge to the graph.

Returns:
[RelationPtr] edge to add
void Graph::AddHierarchy ( Hierarchy  hierarchy)

This method adds a hierarchy level to the graph

Parameters:
hierarchy[Hierarchy]hierarchy level
void Graph::AddRelationEdge ( RelationPtr  edge)

This method adds a relation edge to the graph.

Returns:
[RelationPtr] edge to add
void Graph::AddVertex ( VertexPtr  vert)

This method adds a new node to the graph

Parameters:
vert[VertexPtr] new node
void Graph::Calculate ( )

This method calculates all needed information from the tree

Here is the call graph for this function:

void Graph::CalculateHierarchy ( )

This method calculates the hierarchy level of each node

Here is the caller graph for this function:

std::vector< unsigned int > Graph::CalculatePathOverLCA ( RelationPtr  edge)

This method calculates the LCA for a passed relation edge

Parameters:
edge[RelationPtr] relation edge
Returns:
[unsigned int] node id list

Here is the caller graph for this function:

std::vector< unsigned int > Graph::CalculatePathOverLCA ( VertexPtr  start,
VertexPtr  end 
)

This method calculates the LCA form a passed start note to a passed end node.

Parameters:
start[RelationPtr] start node
end[RelationPtr] end node
Returns:
[unsigned int] node id list
void Graph::CalculatePathToRoot ( )

Here is the caller graph for this function:

void Graph::CalculatePathToRoot ( VertexPtr  actPath,
std::vector< unsigned int >  path 
)

Here is the call graph for this function:

std::vector< VertexPtr > Graph::GetAllVerticesWithoutChild ( )

This method returns all nodes without a child node.

Returns:
[unsigned int] list of all vertices without a child

Here is the call graph for this function:

Here is the caller graph for this function:

Hierarchy Graph::GetHierarchyAt ( int  level)

This method returns the hierarchy

Parameters:
level[int]selected hierarchy
Returns:
[Hierarchy] hierarchy level
HierarchyPtr Graph::GetHierarchyEdgeAt ( unsigned int  at)

This method returns the hierarchy edge at a passed position.

Parameters:
count[int] position of the edge
Returns:
[RelationPtr] relation id
HierarchyPtr Graph::GetHierarchyEdgeWithID ( unsigned int  id)

This method returns a hierarchy edge to the corresponding id

Parameters:
count[int] id of the edge
Returns:
[RelationPtr] edge to add
unsigned int Graph::GetNumberOfHiearchicEdges ( )

This method returns the number of hierarchy edges

Returns:
[RelationPtr] number of hierarchy edges

Here is the caller graph for this function:

int Graph::GetNumberOfHierarchies ( )

This method returns the number of hierarchies

Returns:
[int] number of hierarchies

Here is the caller graph for this function:

unsigned int Graph::GetNumberOfRelationEdges ( )

This method returns the number of relation edges

Returns:
[RelationPtr] number of relation edges

Here is the caller graph for this function:

int Graph::GetNumberOfVertices ( )

This method returns the number of vertices.

Returns:
[int] number of vertices

Here is the caller graph for this function:

RelationPtr Graph::GetRelationEdgeAt ( unsigned int  at)

This method returns the Relation edge at a passed position.

Parameters:
count[int] position of the edge
Returns:
[RelationPtr] relation id

Here is the caller graph for this function:

RelationPtr Graph::GetRelationEdgeWithID ( unsigned int  id)

This method returns a relation edge to the corresponding id

Parameters:
count[int] id of the edge
Returns:
[RelationPtr] edge to add
VertexPtr Graph::GetRoot ( )

This method returns the root.

Parameters:
VertexPtr]root.

Here is the caller graph for this function:

std::vector< VertexPtr > Graph::GetVertexPtrVectorFromIDVector ( std::vector< unsigned int >  ids)

This method converts a list of IDs to a list of VertexPtr

Parameters:
ids[std::vector<unsigned int>] list of id
Returns:
[std::vector<unsigned int>] list of VertexPtr

Here is the call graph for this function:

VertexPtr Graph::GetVertexWithID ( unsigned int  id)

This method returns the node corresponding to the passed id

Parameters:
id[unsigned int] id
Returns:
[VertexPtr] node

Here is the caller graph for this function:

void Graph::RemoveHierarchy ( int  level)

This method removes a hierarchy

Parameters:
level[int]hierarchy to remove
void Graph::RemoveVertex ( Vertex vert)

This method removes the passed node.

Parameters:
vert[Vertex] Node to delete.

Here is the call graph for this function:

void Graph::RemoveVertexWithID ( unsigned int  id)

This method removes the node corresponding to the passed id.

Parameters:
id[unsigned int] id

Here is the caller graph for this function:

void Graph::SetHierarchyAt ( int  level,
Hierarchy  hierarchy 
)

This method updates a adds a hierarchy edge to the graph

Parameters:
level[int]hierarchy to update
hierarchy[Hierarchy]hierarchy level
void Graph::SetNumberOfHierarchies ( int  count)

This method sets the number of hierarchies .

Parameters:
count[int] number of hierarchies
void Graph::SetRoot ( int  id)

This method set the node corresponding to the passed id as root.

Parameters:
id[int] id of the root.

Here is the call graph for this function:


Member Data Documentation

vector<Hierarchy> Graph::m_hierarchy [protected]
std::map<unsigned int, HierarchyPtr> Graph::m_hierarchyedges [protected]
std::map<unsigned int, RelationPtr> Graph::m_relationedge [protected]
std::map<unsigned int, VertexPtr> Graph::m_vertices [protected]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines