Ejemplo n.º 1
0
NodeSet * isochrone ( const RLC::AbstractGraph * g, const int center, const int max_time )
{
    typedef AspectMaxCostPruning<AspectMinCost<DRegLC> > Dij;
    NodeSet * ns = new NodeSet( g->transport->num_vertices() );
    
    Dij::ParamType p(
        DRegLCParams( g, 0, 1 ),
        AspectMaxCostPruningParams( max_time )
    );
    
    Dij dij( p );
    BOOST_FOREACH( int state, g->dfa_start_states() ) {
        dij.add_source_node( RLC::Vertice(center, state), 0, 0 );
    }
    while( !dij.finished() ) {
        RLC::Label lab = dij.treat_next();
        ns->addNode( lab.node.first );
    }
    
    return ns;
}