MCPcopy Create free account
hub / github.com/douchuan/algorithm / connected

Method connected

src/graph/undirected/cc.rs:48–50  ·  view source on GitHub ↗

are v and w connected?

(&self, v: usize, w: usize)

Source from the content-addressed store, hash-verified

46
47 /// are v and w connected?
48 pub fn connected(&self, v: usize, w: usize) -> bool {
49 self.id[v] == self.id[w]
50 }
51
52 /// number of connected components
53 pub fn count(&self) -> usize {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected