#include "../Config.h"#include "GraphExamples.h"#include "DisplayWindow.h"#include <terralib/dataaccess/utils/Utils.h>#include <terralib/datatype/SimpleData.h>#include <terralib/graph/core/AbstractGraph.h>#include <terralib/graph/core/Edge.h>#include <terralib/graph/core/GraphMetadata.h>#include <terralib/graph/core/Vertex.h>#include <terralib/graph/iterator/MemoryIterator.h>#include <terralib/graph/Globals.h>#include <terralib/se.h>#include <terralib/sa/core/GeneralizedProximityMatrix.h>#include <terralib/sa/core/MinimumSpanningTree.h>#include <terralib/sa/core/SpatialWeightsExchanger.h>#include <terralib/sa/core/Utils.h>#include <iostream>#include <boost/shared_ptr.hpp>#include <QApplication>Go to the source code of this file.
Functions | |
| double | CalculateWeight (std::vector< int > attrsIdx, te::graph::Vertex *vFrom, te::graph::Vertex *vTo) |
| void | CreateMSTGraph (bool draw) |
| Creates a MST GRAPH. More... | |
| void | CreateWeightAttribute (te::graph::AbstractGraph *graph, int weightAttrIdx, std::vector< int > attrsIdx) |
| te::se::Style * | getMSTGraphStyle () |
| double CalculateWeight | ( | std::vector< int > | attrsIdx, |
| te::graph::Vertex * | vFrom, | ||
| te::graph::Vertex * | vTo | ||
| ) |
Definition at line 147 of file CreateMSTGraph.cpp.
References te::graph::Vertex::getAttributes(), and te::sa::GetDataValue().
Referenced by CreateWeightAttribute().
| void CreateMSTGraph | ( | bool | draw | ) |
Creates a MST GRAPH.
Definition at line 34 of file CreateMSTGraph.cpp.
References DisplayWindow::addGraph(), te::sa::AddGraphEdgeAttribute(), DisplayWindow::addVectorialLayer(), te::sa::AssociateGPMVertexAttribute(), CreateWeightAttribute(), te::dt::DOUBLE_TYPE, ds, te::da::GetFirstSpatialPropertyPos(), te::graph::AbstractGraph::getMetadata(), getMSTGraphStyle(), te::sa::SpatialWeightsExchanger::importFromGAL(), OpenOGRDataSource(), te::graph::GraphMetadata::setSRID(), and TE_SA_SKATER_ATTR_WEIGHT_NAME.
Referenced by main().
| void CreateWeightAttribute | ( | te::graph::AbstractGraph * | graph, |
| int | weightAttrIdx, | ||
| std::vector< int > | attrsIdx | ||
| ) |
Definition at line 122 of file CreateMSTGraph.cpp.
References te::graph::Edge::addAttribute(), CalculateWeight(), te::graph::GraphMetadata::getEdgePropertySize(), te::graph::MemoryIterator::getFirstEdge(), te::graph::Edge::getIdFrom(), te::graph::Edge::getIdTo(), te::graph::AbstractGraph::getMetadata(), te::graph::MemoryIterator::getNextEdge(), te::graph::AbstractGraph::getVertex(), and te::graph::Edge::setAttributeVecSize().
Referenced by CreateMSTGraph().
| te::se::Style * getMSTGraphStyle | ( | ) |
Definition at line 101 of file CreateMSTGraph.cpp.
References te::se::CreateFill(), te::se::CreateGraphic(), te::se::CreateLineSymbolizer(), te::se::CreateMark(), te::se::CreatePointSymbolizer(), te::se::CreateStroke(), te::se::Style::push_back(), and te::se::Rule::push_back().
Referenced by CreateMSTGraph().