34 firstVertex = edge.firstVertex;
35 secondVertex = edge.secondVertex;
50 return (firstVertex == edge.firstVertex &&
51 secondVertex == edge.secondVertex &&
67 if (find(outs.begin(), outs.end(), edge) != outs.end()) {
74 if (find(ins.begin(), ins.end(), edge) != ins.end()) {
87 return property.toString() <
v1.property.toString();
105 auto itr = mVertices.begin();
106 for(;itr!=mVertices.end(); itr++) {
122 if (itr != mVertices.end()) {
126 mVertices.push_back((
Vertex*) &vertex);
127 return mVertices.end()-1;
136 if (
vi == mVertices.end()) {
156 (**vi1).insertOuts(edge);
157 (**vi2).insertIns(edge);
161 auto itr = mVertices.begin();
162 for(;itr!=mVertices.end(); itr++) {
163 if (*(*itr) == vertex) {
167 return mVertices.end();
172 auto itr = mVertices.begin();
174 for (; itr != mVertices.end(); itr++) {
175 count += (**itr).degree();
181 return mVertices.size();
186 auto itr = mVertices.begin();
187 for (; itr != mVertices.end(); itr++) {
196 std::stack<Vertex*>&
S,
int& index) {
208 const Edge&
e = (*eitr);
237 }
while(!
S.empty() && w != v);
239 if(
vset.size() > 1) {
255 for(
vitr = vertices.begin();
vitr!=vertices.end();
vitr++) {
262 std::stack<Vertex*>
S;
264 for(
vitr = vertices.begin();
vitr!=vertices.end();
vitr++) {
void strongConnect(Vertex *v, graph_subset &scc, std::stack< Vertex * > &S, int &index)
std::vector< pvertex_set > graph_subset
edge_set::const_iterator edge_const_iterator
pvertex_set::const_iterator pvertex_const_iterator
std::vector< yarp::profiler::graph::Vertex * > pvertex_set
pvertex_set::iterator pvertex_iterator
std::vector< yarp::profiler::graph::Edge > edge_set
A mini-server for performing network communication in the background.
A class for storing options and configuration information.
Value & find(const std::string &key) const override
Gets a value corresponding to a given keyword.
std::string toString() const override
Return a standard text representation of the content of the object.
void put(const std::string &key, const std::string &value)
Associate the given key with the given string.
bool check(const std::string &key) const override
Check if there exists a property of the given name.
void unput(const std::string &key)
Remove the association from the given key to a value, if present.
virtual std::int32_t asInt32() const
Get 32-bit integer value.
static bool calcSCC(yarp::profiler::graph::Graph &graph, graph_subset &scc)
calcSCC
The yarp::profiler::graph::Edge class.
virtual bool operator==(const yarp::profiler::graph::Edge &edge) const
const yarp::profiler::graph::Vertex & second() const
Edge(const yarp::profiler::graph::Vertex &firstV, const yarp::profiler::graph::Vertex &secondV, yarp::os::Property property="")
yarp::profiler::graph::Edge
yarp::os::Property property
const yarp::profiler::graph::Vertex & first() const
The yarp::profiler::graph::Graph class.
void insertEdge(const Vertex &v1, const Vertex &v2, const yarp::os::Property &property="")
const pvertex_set & vertices()
const pvertex_iterator find(const Vertex &v1)
void remove(const Vertex &vertex)
Graph()
yarp::profiler::graph::Graph
pvertex_iterator insert(const Vertex &vertex)
The yarp::profiler::graph::Vertex class.
yarp::os::Property property
virtual bool operator<(const Vertex &v1) const
const edge_set & outEdges() const
Vertex(const yarp::os::Property &prop)
yarp::profiler::graph::Vertex
An interface to the operating system, including Port based communication.