pub fn find_node_by_weight(
        &self,
        py: Python,
        obj: PyObject,
    ) -> PyResult<Option<usize>> {
        find_node_by_weight(py, &self.graph, &obj)
            .map(|node| node.map(|x| x.index()))
    }
/// Find node within this graph given a specific weight
///
/// This algorithm has a worst case of O(n) since it searches the node
/// indices in order. If there is more than one node in the graph with the
/// same weight only the first match (by node index) will be returned.
///
/// :param obj: The weight to look for in the graph.
///
/// :returns: the index of the first node in the graph that is equal to the
///     weight. If no match is found ``None`` will be returned.
/// :rtype: int
Find node within this graph given a specific weight
This algorithm has a worst case of O(n) since it searches the node
indices in order. If there is more than one node in the graph with the
same weight only the first match (by node index) will be returned.

:param obj: The weight to look for in the graph.

:returns: the index of the first node in the graph that is equal to the
weight. If no match is found ``None`` will be returned.
:rtype: int
Find node within this graph given a specific weight This algorithm has a worst case of O ( n ) since it searches the node indices in order . If there is more than one node in the graph with the same weight only the first match ( by node index ) will be returned . : param obj : The weight to look for in the graph . : returns : the index of the first node in the graph that is equal to the weight . If no match is found ` ` None ` ` will be returned . : rtype : int
pub fn find_node_by_weight(
        &self,
        py: Python,
        obj: PyObject,
    ) -> PyResult<Option<usize>> {
        find_node_by_weight(py, &self.graph, &obj)
            .map(|node| node.map(|x| x.index()))
    }
pub fn find_node_by_weight ( & self , py : Python , obj : PyObject , ) -> PyResult < Option < usize > > { find_node_by_weight ( py , & self . graph , & obj ) . map ( | node | node . map ( | x | x . index ( ) ) ) }
Find node within this graph given a specific weight
This algorithm has a worst case of O(n) since it searches the node
indices in order.
Find node within this graph given a specific weight This algorithm has a worst case of O ( n ) since it searches the node indices in order .
&self
py
Python
obj
PyObject
&self
py
Python
obj
PyObject