Dê um impulso a filter_graph pela propriedade label do vértice

Atualmente, tenho um gráfico, que acompanhovertices elabels por meio de umexternal map. Então, sempre que eu precisar acessar a propriedade label, encontro o rótulo no mapa e obtenho omapped vertex.

/// vertex properties
struct VertexData
{
    std::string label;
    int num;
};

/// edges properties
struct EdgeData
{
    std::string edge_name;
    double edge_confidence;
};

/// define the boost-graph
typedef boost::adjacency_list<boost::vecS, boost::vecS,
        boost::bidirectionalS,
        boost::property<boost::edge_index_t , size_t , VertexData>,
        boost::property<boost::edge_weight_t, double, EdgeData> > Graph;

/// define vertexMap
std::map<std::string, vertex_t> vertexMap;

///loop through the vertices to make the vertexMap here ...
vertexMap.insert(std::pair<std::string, vertex_t> (label, v));

/// find any label in the map and access the corresponding vertex
vertex_t vertex = vertexMap.find(label)->second;

Agora, minha pergunta é: se eu quiser fazer umafiltered_graph do gráfico atual, filtrando alguns rótulos, como devo fazer isso noclass template? Os exemplos na biblioteca de gráficos de reforço são diferentes, e eu verifiquei também este postimpulsionar a cópia do gráfico e remover o vértice mas é bem diferente do que eu quero fazer.

Obrigado por qualquer ajuda.

questionAnswers(1)

yourAnswerToTheQuestion