Exemplo n.º 1
0
Arquivo: Flow.C Projeto: 8l/rose
Flow Flow::edgesOfType(EdgeType edgeType) {
  Flow flow;
  for(Flow::iterator i=begin();i!=end();++i) {
    if((*i).isType(edgeType))
      flow.insert(*i);
  }
  flow.setDotOptionDisplayLabel(_dotOptionDisplayLabel);
  flow.setDotOptionDisplayStmt(_dotOptionDisplayStmt);
  return flow;
}
Exemplo n.º 2
0
Arquivo: Flow.C Projeto: 8l/rose
Flow Flow::inEdges(Label label) {
  Flow flow;
  for(Flow::iterator i=begin();i!=end();++i) {
    if((*i).target==label)
      flow.insert(*i);
  }
  flow.setDotOptionDisplayLabel(_dotOptionDisplayLabel);
  flow.setDotOptionDisplayStmt(_dotOptionDisplayStmt);
  return flow;
}
Exemplo n.º 3
0
Arquivo: Flow.C Projeto: 8l/rose
Flow Flow::outEdges(Label label) {
  Flow flow;
  if(!_boostified) {
    for(Flow::iterator i=begin();i!=end();++i) {
      if((*i).source==label)
        flow.insert(*i);
    }
  } else {
    typedef graph_traits<FlowGraph> GraphTraits;
    //    typename property_map<FlowGraph, vertex_index_t>::type 
    // index = get(vertex_index, _flowGraph);
    GraphTraits::out_edge_iterator out_i, out_end;
    GraphTraits::edge_descriptor e;
    for (tie(out_i, out_end) = out_edges(label.getId(), _flowGraph); 
         out_i != out_end; ++out_i) {
      e = *out_i;
      Label src = source(e, _flowGraph), targ = target(e, _flowGraph);
      flow.insert(Edge(src,_flowGraph[e],targ));
    }
  }
  flow.setDotOptionDisplayLabel(_dotOptionDisplayLabel);
  flow.setDotOptionDisplayStmt(_dotOptionDisplayStmt);
  return flow;
}