| The Gaudi Framework v28r2-patches (bc4ad17a)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
concurrency::RankerByEccentricity Class Reference

`#include <src/PRGraphVisitors.h>`

Inheritance diagram for concurrency::RankerByEccentricity:
[legend]
Collaboration diagram for concurrency::RankerByEccentricity:
[legend]

## Public Member Functions
| RankerByEccentricity ()
| Constructor. More...
| ~RankerByEccentricity () override
| Destructor. More...
bool | visitEnter (DecisionNode &) const override
bool | visit (DecisionNode &) override
bool | visitLeave (DecisionNode &) const override
bool | visitEnter (AlgorithmNode &) const override
bool | visit (AlgorithmNode &node) override
void | reset () override
Public Member Functions inherited from concurrency::IGraphVisitor
virtual | ~IGraphVisitor ()

## Additional Inherited Members
Public Attributes inherited from concurrency::IGraphVisitor
int | m_nodesSucceeded
int | m_slotNum

## Detailed Description

Definition at line 171 of file PRGraphVisitors.h.

## Constructor & Destructor Documentation

concurrency::RankerByEccentricity::RankerByEccentricity | ( |  | ) |
| inline

Constructor.

Definition at line 174 of file PRGraphVisitors.h.

174 {
175 m_nodesSucceeded = 0;
176 m_slotNum = -1;
177 };
concurrency::IGraphVisitor::m_slotNum
int m_slotNum
Definition: IGraphVisitor.h:24
concurrency::IGraphVisitor::m_nodesSucceeded
int m_nodesSucceeded
Definition: IGraphVisitor.h:23

concurrency::RankerByEccentricity::~RankerByEccentricity | ( |  | ) |
| inline override

Destructor.

Definition at line 179 of file PRGraphVisitors.h.

179 {}

## Member Function Documentation

void concurrency::RankerByEccentricity::reset | ( |  | ) |
| inline override virtual

Implements concurrency::IGraphVisitor.

Definition at line 193 of file PRGraphVisitors.h.

193 { m_nodesSucceeded = 0; }
concurrency::IGraphVisitor::m_nodesSucceeded
int m_nodesSucceeded
Definition: IGraphVisitor.h:23

bool concurrency::RankerByEccentricity::visit | ( | DecisionNode & |  | ) |
| inline override virtual

Implements concurrency::IGraphVisitor.

Definition at line 183 of file PRGraphVisitors.h.

183 {return true;}

bool concurrency::RankerByEccentricity::visit | ( | AlgorithmNode & | node | ) |
| override virtual

Implements concurrency::IGraphVisitor.

Definition at line 337 of file PRGraphVisitors.cpp.

337 {
338
339 std::ifstream myfile;
340 myfile.open("Eccentricity.graphml", std::ios::in);
341
342 boost::ExecPlan execPlan;
343
344 boost::dynamic_properties dp;
345 dp.property("name", boost::get(&boost::AlgoNodeStruct::m_name, execPlan));
346 dp.property("Eccentricity", boost::get(&boost::AlgoNodeStruct::m_eccentricity, execPlan));
347
348 boost::read_graphml(myfile, execPlan, dp);
349
350 typedef boost::graph_traits<boost::ExecPlan>::vertex_iterator itV;
351 std::pair<itV, itV> vp;
352 typedef boost::graph_traits<boost::ExecPlan>::vertex_descriptor AlgoVertex;
353
354 for (vp = boost::vertices(execPlan); vp.first != vp.second; ++vp.first) {
355 AlgoVertex v = *vp.first;
356 auto index = boost::get(&boost::AlgoNodeStruct::m_name, execPlan);
357 if (index[v] == node.getNodeName()) {
358 auto index_eccentricity = boost::get(&boost::AlgoNodeStruct::m_eccentricity, execPlan);
359 float rank = index_eccentricity[v];
360 node.setRank(rank);
361 //std::cout << "Rank of " << index[v] << " is " << rank << std::endl;
362 }
363 }
364 return true;
365 }
std::ifstream::open
T open(T...args)
boost::ExecPlan
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, AlgoNodeStruct > ExecPlan
Definition: PrecedenceRulesGraph.h:37
boost::AlgoNodeStruct::m_eccentricity
double m_eccentricity
Definition: PrecedenceRulesGraph.h:34
boost::AlgoVertex
graph_traits< ExecPlan >::vertex_descriptor AlgoVertex
Definition: PrecedenceRulesGraph.h:38
boost::AlgoNodeStruct::m_name
std::string m_name
Definition: PrecedenceRulesGraph.h:30
std::pair
GaudiPython.Persistency.get
def get(type_)
Definition: Persistency.py:23
std::ifstream
STL class.

bool concurrency::RankerByEccentricity::visitEnter | ( | DecisionNode & |  | ) | const
| inline override virtual

Implements concurrency::IGraphVisitor.

Definition at line 181 of file PRGraphVisitors.h.

181 {return true;}

bool concurrency::RankerByEccentricity::visitEnter | ( | AlgorithmNode & |  | ) | const
| inline override virtual

Implements concurrency::IGraphVisitor.

Definition at line 188 of file PRGraphVisitors.h.

188 {return true;}

bool concurrency::RankerByEccentricity::visitLeave | ( | DecisionNode & |  | ) | const
| inline override virtual

Implements concurrency::IGraphVisitor.

Definition at line 185 of file PRGraphVisitors.h.

185 {return true;}

The documentation for this class was generated from the following files:

- GaudiHive/src/PRGraphVisitors.h
- GaudiHive/src/PRGraphVisitors.cpp