MCPcopy Create free account
hub / github.com/QMHTMY/RustBook / is_adjacent

Method is_adjacent

code/chapter08/graph_adjlist.rs:155–157  ·  view source on GitHub ↗

判断两个点是否相邻

(&self, from: &T, to: &T)

Source from the content-addressed store, hash-verified

153
154 // 判断两个点是否相邻
155 fn is_adjacent(&self, from: &T, to: &T) -> bool {
156 self.vertices.get(from).unwrap().adjacent_key(to)
157 }
158}
159
160fn main() {

Callers 1

mainFunction · 0.45

Calls 2

adjacent_keyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected