| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes
TeGraphNetwork Class Reference

class for handling networks More...

`#include <TeNetwork.h>`

List of all members.

## Public Member Functions

| TeGraphNetwork ()
| Empty constructor.
| TeGraphNetwork (TeLineSet &ls)
| Create a graph from TeLineSet; the line size is considered the cost. In this case, graph non-directed.
| TeGraphNetwork (TeLineSet &ls, map< string, double > &line_costs)
| Create a graph from TeLineSet; the cost is given by the map.
| TeGraphNetwork (TeSTElementSet &stos, string &attrName)
| Create a network from a set of line objects; the cost is given by the attrName sto property. The graph is non-directed.
TeGraphNetwork & | operator= (TeGraphNetwork &other)
| Assignment operator.
bool | Add (TeLineSet &ls, map< string, double > &line_costs)
| Add lineset to graph. Useful specially for directed graphs (lines must be entered in both directions. It has to be tested for existing graphs.
bool | minimumPath (TeNode &n1, TeNodeSet &set, vector< double > &dist)
| Calculate the minimun path.
bool | getNode (int i, TeNode &node)
| Get the i-th node.
bool | nearestNodePoint (TeCoord2D &p1, int &lindex, TeCoord2D &pinter, double &distance, double tol=0.0)
| Get the nearest network node of a specific point (p1)
bool | nearestNetworkPoint (TeCoord2D &p1, int &lindex, TeCoord2D &pinter, double &distance, double tol=0.0)
| Get the nearest network lines point from a specific point (p1)
TeLineSet | getLineSet ()
| Get line Set.
map< string, double > | getLineCosts ()
| Get line costs.
void | insertLine (TeLine2D &line, const double &attr)
| Insert a new line.
bool | breakLineSet (TeNode &node, int i)
| Insert a new node.
virtual | ~TeGraphNetwork ()
| Destructor.

## Protected Attributes

br_stl::Graph< TeNode, double > | graph_
| Set of nodes and the cost of each edge.
TeLineSet | line_set_
| Set of geometric representation of edges.
map< string, double > | line_cost_
| A map to associate each edge (line object_id) to its cost.

## Detailed Description

class for handling networks

## Constructor & Destructor Documentation

TeGraphNetwork::TeGraphNetwork | ( |  | ) | `[inline]`

Empty constructor.

TeGraphNetwork::TeGraphNetwork | ( | TeLineSet & | ls | ) |

Create a graph from TeLineSet; the line size is considered the cost. In this case, graph non-directed.

TeGraphNetwork::TeGraphNetwork | ( | TeLineSet & | ls,
|  | map< string, double > & | line_costs
| ) |  |

Create a graph from TeLineSet; the cost is given by the map.

TeGraphNetwork::TeGraphNetwork | ( | TeSTElementSet & | stos,
|  | string & | attrName
| ) |  |

Create a network from a set of line objects; the cost is given by the attrName sto property. The graph is non-directed.

virtual TeGraphNetwork::~TeGraphNetwork | ( |  | ) | `[inline, virtual]`

Destructor.

## Member Function Documentation

bool TeGraphNetwork::Add | ( | TeLineSet & | ls,
|  | map< string, double > & | line_costs
| ) |  |

Add lineset to graph. Useful specially for directed graphs (lines must be entered in both directions. It has to be tested for existing graphs.

bool TeGraphNetwork::breakLineSet | ( | TeNode & | node,
|  | int | i
| ) |  |

Insert a new node.

map<string, double> TeGraphNetwork::getLineCosts | ( |  | ) | `[inline]`

Get line costs.

TeLineSet TeGraphNetwork::getLineSet | ( |  | ) | `[inline]`

Get line Set.

bool TeGraphNetwork::getNode | ( | int | i,
|  | TeNode & | node
| ) |  |

Get the i-th node.

void TeGraphNetwork::insertLine | ( | TeLine2D & | line,
|  | const double & | attr
| ) |  |

Insert a new line.

bool TeGraphNetwork::minimumPath | ( | TeNode & | n1,
|  | TeNodeSet & | set,
|  | vector< double > & | dist
| ) |  |

Calculate the minimun path.

bool TeGraphNetwork::nearestNetworkPoint | ( | TeCoord2D & | p1,
|  | int & | lindex,
|  | TeCoord2D & | pinter,
|  | double & | distance,
|  | double | tol = `0.0`
| ) |  |

Get the nearest network lines point from a specific point (p1)

bool TeGraphNetwork::nearestNodePoint | ( | TeCoord2D & | p1,
|  | int & | lindex,
|  | TeCoord2D & | pinter,
|  | double & | distance,
|  | double | tol = `0.0`
| ) |  |

Get the nearest network node of a specific point (p1)

TeGraphNetwork& TeGraphNetwork::operator= | ( | TeGraphNetwork & | other | ) | `[inline]`

Assignment operator.

## Member Data Documentation

br_stl::Graph<TeNode, double> TeGraphNetwork::graph_`[protected]`

Set of nodes and the cost of each edge.

map<string, double> TeGraphNetwork::line_cost_`[protected]`

A map to associate each edge (line object_id) to its cost.

TeLineSet TeGraphNetwork::line_set_`[protected]`

Set of geometric representation of edges.

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

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeNetwork.h
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeNetwork.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines