0
I am doing a graph TAD and I use a map structure to map the ID of a vertex to its index in the adjacency matrix and to do this I need to first check if given the vertex id it is already added to the graph, then how can I verify if there is a mapped value for a given key? the code is something like this
bool Graph::add_edge(vertex o, vertex d){
///if(index[o] existe)
/// if(index[d] existe)
///add aresta
}