The Gaudi Framework  v30r1 (5d4f4ae2)
concurrency::RankerByEccentricity Class Reference

#include <src/PRGraphVisitors.h>

Inheritance diagram for concurrency::RankerByEccentricity:
Collaboration diagram for concurrency::RankerByEccentricity:

Public Member Functions

bool visit (AlgorithmNode &) override
 
- Public Member Functions inherited from concurrency::IGraphVisitor
virtual ~IGraphVisitor ()=default
 
virtual bool visitEnter (DecisionNode &) const
 
virtual bool visit (DecisionNode &)
 
virtual bool visitEnter (AlgorithmNode &) const
 
virtual bool visitEnter (DataNode &) const
 
virtual bool visit (DataNode &)
 
virtual bool visitEnter (ConditionNode &) const
 
virtual bool visit (ConditionNode &)
 
virtual void reset ()
 

Detailed Description

Definition at line 106 of file PRGraphVisitors.h.

Member Function Documentation

bool concurrency::RankerByEccentricity::visit ( AlgorithmNode node)
overridevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 425 of file PRGraphVisitors.cpp.

426  {
427 
428  std::ifstream myfile;
429  myfile.open( "Eccentricity.graphml", std::ios::in );
430 
431  precedence::PrecTrace execPlan;
432 
433  boost::dynamic_properties dp;
434  using boost::get;
435 
436  dp.property( "name", get( &precedence::AlgoTraceProps::m_name, execPlan ) );
437  dp.property( "Eccentricity", get( &precedence::AlgoTraceProps::m_eccentricity, execPlan ) );
438 
439  boost::read_graphml( myfile, execPlan, dp );
440 
441  typedef boost::graph_traits<precedence::PrecTrace>::vertex_iterator itV;
443 
444  for ( vp = boost::vertices( execPlan ); vp.first != vp.second; ++vp.first ) {
445  precedence::AlgoTraceVertex v = *vp.first;
446  auto index = get( &precedence::AlgoTraceProps::m_name, execPlan );
447  if ( index[v] == node.getNodeName() ) {
448  auto index_eccentricity = get( &precedence::AlgoTraceProps::m_eccentricity, execPlan );
449  float rank = index_eccentricity[v];
450  node.setRank( rank );
451  // std::cout << "Rank of " << index[v] << " is " << rank << std::endl;
452  }
453  }
454  return true;
455  }
T open(T...args)
boost::graph_traits< PrecTrace >::vertex_descriptor AlgoTraceVertex
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, AlgoTraceProps > PrecTrace
STL class.

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