pub fn update(&self, distance: &O, newnode: usize) -> HeapData<O> {
        HeapData {
            val: distance + &self.val,
            node: newnode,
            from: Some(self.node),
        }
    }
/// Update the HeapData struct, as if the new node can be connected to the old node
/// at a distance.
Update the HeapData struct, as if the new node can be connected to the old node
at a distance.
Update the HeapData struct as if the new node can be connected to the old node at a distance .
pub fn update(&self, distance: &O, newnode: usize) -> HeapData<O> {
        HeapData {
            val: distance + &self.val,
            node: newnode,
            from: Some(self.node),
        }
    }
pub fn update ( & self , distance : & O , newnode : usize ) -> HeapData < O > { HeapData { val : distance + & self . val , node : newnode , from : Some ( self . node ) , } }
Update the HeapData struct, as if the new node can be connected to the old node
at a distance.
Update the HeapData struct as if the new node can be connected to the old node at a distance .
&self
distance
&O
newnode
usize
&self
distance
&O
newnode
usize