pub fn parent(&self, node: NodeIndex) -> Option<(NodeIndex, EdgeIndex)> {
        self.graph
            .edges_directed(node, Direction::Incoming)
            .next()
            .map(|edge_ref| (edge_ref.source(), edge_ref.id()))
    }
/// Get the parent and corresponding edge of a tree node.
///
/// * Returns `NodeIndex` of immediately dominating node and corresponding `EdgeIndex`.
/// * Returns `None` if `node` doesn't exist or doesn't have incoming edges.
Get the parent and corresponding edge of a tree node.
Returns `NodeIndex` of immediately dominating node and corresponding `EdgeIndex`.
Returns `None` if `node` doesn't exist or doesn't have incoming edges.
Get the parent and corresponding edge of a tree node . Returns ` NodeIndex ` of immediately dominating node and corresponding ` EdgeIndex ` . Returns ` None ` if ` node ` doesn ' t exist or doesn ' t have incoming edges .
pub fn parent(&self, node: NodeIndex) -> Option<(NodeIndex, EdgeIndex)> {
        self.graph
            .edges_directed(node, Direction::Incoming)
            .next()
            .map(|edge_ref| (edge_ref.source(), edge_ref.id()))
    }
pub fn parent ( & self , node : NodeIndex ) -> Option < ( NodeIndex , EdgeIndex ) > { self . graph . edges_directed ( node , Direction :: Incoming ) . next ( ) . map ( | edge_ref | ( edge_ref . source ( ) , edge_ref . id ( ) ) ) }
Get the parent and corresponding edge of a tree node.
Get the parent and corresponding edge of a tree node .
&self
node
NodeIndex
&self
node
NodeIndex