pub fn classify(&mut self, rott: f64) -> PacketLoss {
        assert!(rott >= 0.0);

        self.s_f = (1.0 - self.gamma) * self.s_f;
        if rott > self.previous_rott {
            self.s_f += self.gamma;
        }

        self.previous_rott = rott;

        if self.s_threshold < self.s_f {
            PacketLoss::Congestion
        } else {
            PacketLoss::Wireless
        }
    }
/// Classifies the reason of packet loss based on the ROTT of the current packet.
///
/// This function is called with the ROTT (relative one-way trip time) of the current
/// packet if previous packets were lost.
///
/// # Arguments
///
/// - `rott`: relative one-way trip time of the current packet.
Classifies the reason of packet loss based on the ROTT of the current packet.
This function is called with the ROTT (relative one-way trip time) of the current
packet if previous packets were lost.
Classifies the reason of packet loss based on the ROTT of the current packet . This function is called with the ROTT ( relative one - way trip time ) of the current packet if previous packets were lost .
pub fn classify(&mut self, rott: f64) -> PacketLoss {
        assert!(rott >= 0.0);
        self.s_f = (1.0 - self.gamma) * self.s_f;
        if rott > self.previous_rott {
            self.s_f += self.gamma;
        }
        self.previous_rott = rott;
        if self.s_threshold < self.s_f {
            PacketLoss::Congestion
        } else {
            PacketLoss::Wireless
        }
    }
pub fn classify ( & mut self , rott : f64 ) -> PacketLoss { assert ! ( rott 0.0 ) ; self . s_f = ( 1.0 - self . gamma ) * self . s_f ; if rott > self . previous_rott { self . s_f += self . gamma ; } self . previous_rott = rott ; if self . s_threshold < self . s_f { PacketLoss :: Congestion } else { PacketLoss :: Wireless } }
Classifies the reason of packet loss based on the ROTT of the current packet.
Classifies the reason of packet loss based on the ROTT of the current packet .
&mut self
rott
f64
relative one-way trip time of the current packet.
relative one - way trip time of the current packet .