|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
29 firstVertex = &firstV;
30 secondVertex = &secondV;
37 firstVertex = edge.firstVertex;
38 secondVertex = edge.secondVertex;
53 return (firstVertex == edge.firstVertex &&
54 secondVertex == edge.secondVertex &&
70 if( find(outs.begin(), outs.end(), edge) != outs.end())
return;
75 if( find(ins.begin(), ins.end(), edge) != ins.end())
return;
104 auto itr = mVertices.begin();
105 for(;itr!=mVertices.end(); itr++) {
121 if( itr != mVertices.end())
return itr;
123 mVertices.push_back((
Vertex*) &vertex);
124 return mVertices.end()-1;
133 if(vi == mVertices.end())
return;
148 yAssert(vi1 != mVertices.end());
149 yAssert(vi2 != mVertices.end());
150 Edge edge(**vi1, **vi2, property);
151 (**vi1).insertOuts(edge);
152 (**vi2).insertIns(edge);
156 auto itr = mVertices.begin();
157 for(;itr!=mVertices.end(); itr++) {
158 if(*(*itr) == vertex)
161 return mVertices.end();
166 auto itr = mVertices.begin();
168 for(; itr!=mVertices.end(); itr++)
169 count += (**itr).degree();
174 return mVertices.size();
179 auto itr = mVertices.begin();
180 for(; itr!=mVertices.end(); itr++)
188 std::stack<Vertex*>&S,
int& index) {
199 for(eitr = outs.begin(); eitr!=outs.end(); eitr++) {
200 const Edge& e = (*eitr);
229 }
while(!S.empty() && w != v);
231 if(vset.size() > 1) {
247 for(vitr = vertices.begin(); vitr!=vertices.end(); vitr++) {
254 std::stack<Vertex*> S;
256 for(vitr = vertices.begin(); vitr!=vertices.end(); vitr++) {
const pvertex_iterator find(const Vertex &v1)
yarp::os::Property property
void put(const std::string &key, const std::string &value)
Associate the given key with the given string.
pvertex_set::const_iterator pvertex_const_iterator
pvertex_iterator insert(const Vertex &vertex)
const yarp::profiler::graph::Vertex & first() const
const pvertex_set & vertices()
virtual bool operator<(const Vertex &v1) const
The yarp::profiler::graph::Vertex class.
virtual bool operator==(const yarp::profiler::graph::Edge &edge) const
Value & find(const std::string &key) const override
Gets a value corresponding to a given keyword.
The yarp::profiler::graph::Edge class.
Vertex(const yarp::os::Property &prop)
yarp::profiler::graph::Vertex
yarp::os::Property property
Graph()
yarp::profiler::graph::Graph
std::string toString() const override
Return a standard text representation of the content of the object.
std::vector< yarp::profiler::graph::Vertex * > pvertex_set
bool check(const std::string &key) const override
Check if there exists a property of the given name.
const edge_set & outEdges() const
virtual std::int32_t asInt32() const
Get 32-bit integer value.
An interface to the operating system, including Port based communication.
edge_set::const_iterator edge_const_iterator
void strongConnect(Vertex *v, graph_subset &scc, std::stack< Vertex * > &S, int &index)
The yarp::profiler::graph::Graph class.
std::vector< pvertex_set > graph_subset
static bool calcSCC(yarp::profiler::graph::Graph &graph, graph_subset &scc)
calcSCC
void unput(const std::string &key)
Remove the association from the given key to a value, if present.
void remove(const Vertex &vertex)
std::vector< yarp::profiler::graph::Edge > edge_set
const yarp::profiler::graph::Vertex & second() const
void insertEdge(const Vertex &v1, const Vertex &v2, const yarp::os::Property &property="")
A class for storing options and configuration information.
pvertex_set::iterator pvertex_iterator
Edge(const yarp::profiler::graph::Vertex &firstV, const yarp::profiler::graph::Vertex &secondV, yarp::os::Property property="")
yarp::profiler::graph::Edge