This class defines a function used to add to a graph the deep information attribute. More...
#include <AddDeepAttribute.h>
Public Member Functions | |
| AddDeepAttribute (te::graph::BidirectionalGraph *graph, std::string attributeName) | |
| Default constructor. More... | |
| virtual | ~AddDeepAttribute () |
| Virtual destructor. More... | |
Protected Member Functions | |
| void | calculateDeepValue (te::graph::Vertex *v, te::graph::BidirectionalGraph *g, int &deepValue, std::set< int > &vertexIdSet) |
| Recursive function used to calculate the deep attribute. More... | |
This class defines a function used to add to a graph the deep information attribute.
Definition at line 53 of file AddDeepAttribute.h.
| te::graph::AddDeepAttribute::AddDeepAttribute | ( | te::graph::BidirectionalGraph * | graph, |
| std::string | attributeName | ||
| ) |
Default constructor.
| graph | Pointer to a bidirectional graph |
| attributeName | The name used to represent the deep attribute |
Definition at line 43 of file AddDeepAttribute.cpp.
References te::graph::Vertex::addAttribute(), te::graph::Graph::addVertexProperty(), calculateDeepValue(), te::graph::Graph::flush(), te::graph::SequenceIterator::getFirstVertex(), te::graph::Vertex::getId(), te::dt::Property::getName(), te::graph::AbstractIterator::getNextVertex(), te::graph::AbstractIterator::getVertexInteratorCount(), te::graph::Graph::getVertexProperty(), te::graph::Graph::getVertexPropertySize(), te::dt::INT32_TYPE, te::graph::AbstractIterator::isVertexIteratorAfterEnd(), te::common::TaskProgress::pulse(), te::dt::Property::setId(), te::common::TaskProgress::setMessage(), te::dt::Property::setParent(), te::common::TaskProgress::setTotalSteps(), and te::graph::Graph::update().
|
virtual |
Virtual destructor.
Definition at line 107 of file AddDeepAttribute.cpp.
|
protected |
Recursive function used to calculate the deep attribute.
| v | Current vertex in processing |
| g | The bidirection graph |
| deepValue | Current value for deep attribute calculated |
| vertexIdSet | The set of vertex already visited |
Definition at line 111 of file AddDeepAttribute.cpp.
References te::graph::Graph::getEdge(), te::graph::Vertex::getId(), te::graph::Edge::getIdFrom(), te::graph::Vertex::getPredecessors(), and te::graph::Graph::getVertex().
Referenced by AddDeepAttribute().