Hacer un impulso filter_graph por propiedad de etiqueta de vértice
Actualmente, tengo un gráfico que sigo rastreandovertices
ylabels
por medio de unexternal map
. Entonces, cada vez que necesito acceder a la propiedad de la etiqueta, encuentro la etiqueta en el mapa y obtengo elmapped 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;
Ahora mi pregunta es: si quiero hacer unfiltered_graph
del gráfico actual filtrando algunas etiquetas, ¿cómo debo hacer eso en elclass template
? Los ejemplos en la biblioteca de gráficos de impulso son diferentes, y también revisé esta publicaciónimpulsar la copia del gráfico y eliminar el vértice pero es bastante diferente de lo que quiero hacer.
Gracias por cualquier ayuda.