Check if a node is valid in this graph.
(&mut self, node: GraphNode)
| 283 | |
| 284 | /// Check if a node is valid in this graph. |
| 285 | pub fn is_valid_node(&mut self, node: GraphNode) -> CudaResult<bool> { |
| 286 | let nodes = self.nodes()?; |
| 287 | Ok(nodes.contains(&node)) |
| 288 | } |
| 289 | |
| 290 | /// Get the number of nodes in this graph. |
| 291 | pub fn num_nodes(&mut self) -> CudaResult<usize> { |