From the point of view of graph theory, vertices are treated as featureless and indivisible objects, although they may have additional structure depending on the application from which the graph arises;for instance, a semantic network is a graph in which the vertices represent concepts or classes of objects. More...
#include <Vertex.h>
Public Member Functions | |
int | getId () |
It returns the vertex id. More... | |
Vertex (int id, bool isNew=true) | |
Constructor. More... | |
Vertex (te::graph::Vertex *rhs) | |
Copy constructor. More... | |
~Vertex () | |
Default destructor. More... | |
Vertex Attribute Methods | |
Method used to manager attributes from vertex object. | |
std::vector < te::dt::AbstractData * > & | getAttributes () |
It returns the vector of attributes associated with this element. More... | |
void | setAttributeVecSize (int size) |
This function is used to set the number of attributes associated with the vertex elements. More... | |
void | addAttribute (int idx, te::dt::AbstractData *ad) |
Add a new attribute to this element. More... | |
void | removeAttribute (int idx) |
Remove a attribute associated with this element. More... | |
std::set< int > & | getPredecessors () |
Returns the Predecessors vector. More... | |
std::set< int > & | getSuccessors () |
Returns the Successors vector. More... | |
std::set< int > & | getNeighborhood () |
Returns the Neighborhood vector. More... | |
void | setDirty (bool flag) |
Flag used to indicate that this element was changed. More... | |
bool | isDirty () |
Used to verify the vertex state. More... | |
bool | isNew () |
Flag used to indicate that this element was a new one. More... | |
Protected Attributes | |
std::vector < te::dt::AbstractData * > | m_attrs |
This is the list of all vertex attributes. More... | |
bool | m_dirty |
Flag used to indicate that vertex was changed. More... | |
std::set< int > | m_neighborhood |
List of all neighbors edges (used in undirectional graph). More... | |
bool | m_new |
Flag used to indicate if this element is a new one. More... | |
std::set< int > | m_predecessors |
List of all input edges (used in bidirectional graph). More... | |
std::set< int > | m_successors |
List of all output edges (used in directional graph). More... | |
int | m_vertexId |
This is the vertex unique identifier. More... | |
From the point of view of graph theory, vertices are treated as featureless and indivisible objects, although they may have additional structure depending on the application from which the graph arises;for instance, a semantic network is a graph in which the vertices represent concepts or classes of objects.
te::graph::Vertex::Vertex | ( | int | id, |
bool | isNew = true |
||
) |
Constructor.
id | The vertex identifier |
isNew | Flag used to indicate that the element is new |
Definition at line 36 of file Vertex.cpp.
te::graph::Vertex::Vertex | ( | te::graph::Vertex * | rhs | ) |
Copy constructor.
Definition at line 40 of file Vertex.cpp.
References getAttributes(), getId(), getNeighborhood(), getPredecessors(), and getSuccessors().
te::graph::Vertex::~Vertex | ( | ) |
Default destructor.
Definition at line 60 of file Vertex.cpp.
References te::common::FreeContents().
void te::graph::Vertex::addAttribute | ( | int | idx, |
te::dt::AbstractData * | ad | ||
) |
Add a new attribute to this element.
idx | Index of the new attribute (must be a valid position) |
ad | AbstractData (can be any type of data) |
Definition at line 84 of file Vertex.cpp.
Referenced by te::graph::AddDeepAttribute::AddDeepAttribute(), te::graph::AddRasterAttribute::AddRasterAttribute(), te::sa::BoxMap(), te::graph::LDDGraphBuilder::build(), te::graph::RAGGraphBuilder::createVertexObjects(), te::graph::FlowGraphBuilder::createVertexObjects(), te::sa::GlobalMoranSignificance(), te::sa::GStatistics(), te::sa::LISAMap(), te::sa::LisaStatisticalSignificance(), te::graph::SequenceLoaderStrategy::loadDataByVertexId(), te::graph::BoxLoaderStrategy::loadDataByVertexId(), te::graph::AbstractGraphLoaderStrategy::loadVertexAttrs(), te::sa::LocalMean(), te::sa::MoranIndex(), te::sa::MoranMap(), and te::sa::ZAndWZ().
std::vector< te::dt::AbstractData * > & te::graph::Vertex::getAttributes | ( | ) |
It returns the vector of attributes associated with this element.
Definition at line 74 of file Vertex.cpp.
Referenced by te::graph::AddRasterAttribute::AddRasterAttribute(), te::sa::BoxMap(), te::sa::SkaterPartition::calculateDistance(), te::sa::SkaterPartition::calculateRootMean(), te::sa::SkaterOperation::calculateWeight(), te::sa::GPMConstructorAdjacencyStrategy::constructStrategy(), te::sa::GPMConstructorDistanceStrategy::constructStrategy(), te::sa::GeneralizedProximityMatrix::createDataSet(), te::graph::LayerRenderer::drawDataSourceGraph(), te::graph::LayerRenderer::drawMemoryGraph(), te::sa::FirstMoment(), te::sa::GlobalMoranSignificance(), te::sa::GStatistics(), te::sa::LISAMap(), te::sa::LisaStatisticalSignificance(), te::graph::BoxLoaderStrategy::loadDataByEdgeId(), te::graph::BoxLoaderStrategy::loadDataByVertexId(), te::sa::LocalMean(), te::sa::MoranIndex(), te::sa::MoranMap(), te::sa::BayesLocalOperation::runBayesLocal(), te::sa::SecondMoment(), te::sa::Sum(), Vertex(), and te::sa::ZAndWZ().
int te::graph::Vertex::getId | ( | ) |
It returns the vertex id.
Definition at line 69 of file Vertex.cpp.
Referenced by te::graph::AddDeepAttribute::AddDeepAttribute(), te::graph::GraphData::addVertex(), te::graph::AddDeepAttribute::calculateDeepValue(), te::sa::SkaterPartition::calculateRootDeviation(), te::sa::SkaterPartition::calculateRootMean(), te::sa::GeneralizedProximityMatrix::createDataSet(), te::sa::SkaterOperation::createSkaterMap(), te::graph::LayerRenderer::drawDataSourceGraph(), te::graph::LayerRenderer::drawMemoryGraph(), te::sa::SkaterPartition::edgeToRemove(), te::sa::SpatialWeightsExchanger::exportToGAL(), te::graph::GetSubGraph::getPredecessor(), te::graph::GetSubGraph::GetSubGraph(), te::sa::GStatistics(), te::sa::LocalMean(), te::sa::MoranIndex(), Vertex(), and te::sa::ZAndWZ().
std::set< int > & te::graph::Vertex::getNeighborhood | ( | ) |
Returns the Neighborhood vector.
Definition at line 111 of file Vertex.cpp.
Referenced by te::graph::UndirectedGraph::add(), te::sa::SkaterPartition::calculateRootDeviation(), te::sa::SkaterPartition::calculateRootMean(), te::sa::SkaterOperation::createSkaterMap(), te::sa::SkaterPartition::edgeToRemove(), te::graph::UndirectedGraph::getEdges(), te::graph::UndirectedGraph::getVertexNeighborhood(), te::graph::UndirectedGraph::isIsolateVertex(), te::sa::MinimumSpanningTree::kruskal(), te::graph::UndirectedGraph::removeEdge(), and Vertex().
std::set< int > & te::graph::Vertex::getPredecessors | ( | ) |
Returns the Predecessors vector.
Definition at line 101 of file Vertex.cpp.
Referenced by te::graph::BidirectionalGraph::add(), te::graph::AddDeepAttribute::calculateDeepValue(), te::graph::BidirectionalGraph::getInEdges(), te::graph::GetSubGraph::getPredecessor(), te::graph::GetSubGraph::GetSubGraph(), te::graph::BidirectionalGraph::getVertexNeighborhood(), te::graph::BidirectionalGraph::isIsolateVertex(), te::graph::BidirectionalGraph::isSourceVertex(), te::sa::MinimumSpanningTree::kruskal(), te::graph::SequenceLoaderStrategy::loadDataByVertexId(), te::graph::BoxLoaderStrategy::loadDataByVertexId(), te::graph::BidirectionalGraph::removeEdge(), and Vertex().
std::set< int > & te::graph::Vertex::getSuccessors | ( | ) |
Returns the Successors vector.
Definition at line 106 of file Vertex.cpp.
Referenced by te::graph::DirectedGraph::add(), te::graph::BidirectionalGraph::add(), te::sa::GPMWeightsNoWeightsStrategy::calculate(), te::sa::GPMWeightsInverseDistanceStrategy::calculate(), te::sa::GPMWeightsSquaredInverseDistanceStrategy::calculate(), te::sa::SpatialWeightsExchanger::exportToGAL(), te::graph::DirectedGraph::getOutEdges(), te::graph::BidirectionalGraph::getOutEdges(), te::graph::DirectedGraph::getVertexNeighborhood(), te::graph::BidirectionalGraph::getVertexNeighborhood(), te::sa::GStatistics(), te::graph::BidirectionalGraph::isIsolateVertex(), te::graph::DirectedGraph::isSinkVertex(), te::graph::BidirectionalGraph::isSinkVertex(), te::sa::MinimumSpanningTree::kruskal(), te::graph::SequenceLoaderStrategy::loadDataByVertexId(), te::graph::BoxLoaderStrategy::loadDataByVertexId(), te::sa::LocalMean(), te::sa::MoranIndex(), te::graph::DirectedGraph::removeEdge(), te::graph::BidirectionalGraph::removeEdge(), te::sa::BayesLocalOperation::runBayesLocal(), Vertex(), and te::sa::ZAndWZ().
bool te::graph::Vertex::isDirty | ( | ) |
Used to verify the vertex state.
Definition at line 121 of file Vertex.cpp.
Referenced by te::graph::GraphData::addVertex().
bool te::graph::Vertex::isNew | ( | ) |
Flag used to indicate that this element was a new one.
Definition at line 126 of file Vertex.cpp.
Referenced by te::graph::GraphData::addVertex().
void te::graph::Vertex::removeAttribute | ( | int | idx | ) |
Remove a attribute associated with this element.
idx | Index of the attribute (must be a valid position) |
Definition at line 94 of file Vertex.cpp.
void te::graph::Vertex::setAttributeVecSize | ( | int | size | ) |
This function is used to set the number of attributes associated with the vertex elements.
size | Integer value to define the attribute size |
Definition at line 79 of file Vertex.cpp.
Referenced by te::sa::SpatialWeightsExchanger::associateGeometry(), te::sa::AssociateGPMVertexAttribute(), te::sa::BoxMap(), te::graph::LDDGraphBuilder::build(), te::graph::RAGGraphBuilder::createVertexObjects(), te::graph::FlowGraphBuilder::createVertexObjects(), te::sa::GStatistics(), te::sa::LISAMap(), te::sa::LisaStatisticalSignificance(), te::graph::SequenceLoaderStrategy::loadDataByVertexId(), te::graph::BoxLoaderStrategy::loadDataByVertexId(), te::graph::AbstractGraphLoaderStrategy::loadVertexAttrs(), te::sa::LocalMean(), te::sa::MoranIndex(), te::sa::MoranMap(), and te::sa::ZAndWZ().
void te::graph::Vertex::setDirty | ( | bool | flag | ) |
Flag used to indicate that this element was changed.
flag | Boolean value used to indicate the vertex state |
Definition at line 116 of file Vertex.cpp.
Referenced by te::graph::Graph::update().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |