MCPcopy Create free account
hub / github.com/davisking/dlib / find_connected_nodes

Function find_connected_nodes

dlib/graph_utils/graph_utils.h:419–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417 typename S
418 >
419 typename enable_if<is_graph<typename T::graph_type> >::type find_connected_nodes (
420 const T& n,
421 S& visited
422 )
423 {
424 if (visited.is_member(n.index()) == false)
425 {
426 unsigned long temp = n.index();
427 visited.add(temp);
428
429 for (unsigned long i = 0; i < n.number_of_neighbors(); ++i)
430 find_connected_nodes(n.neighbor(i), visited);
431 }
432 }
433
434 template <
435 typename T,

Callers 1

graph_is_connectedFunction · 0.85

Calls 6

neighborMethod · 0.80
number_of_parentsMethod · 0.80
number_of_childrenMethod · 0.80
indexMethod · 0.45
addMethod · 0.45
number_of_neighborsMethod · 0.45

Tested by

no test coverage detected