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

Method is_adjacent

publication/code/chapter09/graph_adjlist.rs:153–155  ·  view source on GitHub ↗

判断两个点是否相邻

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

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.45

Calls 2

adjacent_keyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected