AddDeepAttribute.h
Go to the documentation of this file.
1
/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3
This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5
TerraLib is free software: you can redistribute it and/or modify
6
it under the terms of the GNU Lesser General Public License as published by
7
the Free Software Foundation, either version 3 of the License,
8
or (at your option) any later version.
9
10
TerraLib is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU Lesser General Public License for more details.
14
15
You should have received a copy of the GNU Lesser General Public License
16
along with TerraLib. See COPYING. If not, write to
17
TerraLib Team at <terralib-team@terralib.org>.
18
*/
19
20
/*!
21
\file AddDeepAttribute.h
22
23
\brief This class defines a function used to add to a graph the deep information attribute
24
25
*/
26
27
#ifndef __TERRALIB_GRAPH_INTERNAL_ADDDEEPATTRIBUTE_H
28
#define __TERRALIB_GRAPH_INTERNAL_ADDDEEPATTRIBUTE_H
29
30
// Terralib Includes
31
#include "../Config.h"
32
33
34
// STL Includes
35
#include <string>
36
#include <set>
37
38
namespace
te
39
{
40
namespace
graph
41
{
42
// Forward declaration
43
class
BidirectionalGraph;
44
class
Vertex;
45
46
/*!
47
\class AddDeepAttribute
48
49
\brief This class defines a function used to add to a graph the deep information attribute
50
51
*/
52
53
class
TEGRAPHEXPORT
AddDeepAttribute
54
{
55
public
:
56
57
/*!
58
\brief Default constructor.
59
60
\param graph Pointer to a bidirectional graph
61
62
\param attributeName The name used to represent the deep attribute
63
64
*/
65
AddDeepAttribute
(
te::graph::BidirectionalGraph
* graph, std::string attributeName);
66
67
/*! \brief Virtual destructor. */
68
virtual
~AddDeepAttribute
();
69
70
71
protected
:
72
73
/*!
74
\brief Recursive function used to calculate the deep attribute
75
76
\param v Current vertex in processing
77
78
\param g The bidirection graph
79
80
\param deepValue Current value for deep attribute calculated
81
82
\param vertexIdSet The set of vertex already visited
83
*/
84
void
calculateDeepValue
(
te::graph::Vertex
* v,
te::graph::BidirectionalGraph
* g,
int
& deepValue, std::set<int>& vertexIdSet);
85
86
};
87
88
}
// end namespace graph
89
}
// end namespace te
90
91
#endif // __TERRALIB_GRAPH_INTERNAL_ADDDEEPATTRIBUTE_H
te::graph::BidirectionalGraph
This is a implementation of a Bidirectional Graph. By convention a bidirectional graph provides acces...
Definition:
BidirectionalGraph.h:57
te
TerraLib.
Definition:
AddressGeocodingOp.h:52
te::graph::Vertex
From the point of view of graph theory, vertices are treated as featureless and indivisible objects,...
Definition:
Vertex.h:69
TEGRAPHEXPORT
#define TEGRAPHEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition:
Config.h:178
te::graph::AddDeepAttribute::AddDeepAttribute
AddDeepAttribute(te::graph::BidirectionalGraph *graph, std::string attributeName)
Default constructor.
te::graph::AddDeepAttribute::calculateDeepValue
void calculateDeepValue(te::graph::Vertex *v, te::graph::BidirectionalGraph *g, int &deepValue, std::set< int > &vertexIdSet)
Recursive function used to calculate the deep attribute.
te::graph::AddDeepAttribute
This class defines a function used to add to a graph the deep information attribute.
Definition:
AddDeepAttribute.h:54
te::graph::AddDeepAttribute::~AddDeepAttribute
virtual ~AddDeepAttribute()
Virtual destructor.
git_release
src
terralib
graph
functions
AddDeepAttribute.h
Generated on Fri Dec 4 2020 09:43:35 for TerraLib by
1.8.20