pub fn scaling_factor(&self) -> Option<f64> {
        if let Some(ta) = self.target_acceptance {
            if self.attempted == 0 {
                return None;
            };
            let quotient = self.accepted as f64 / self.attempted as f64 / ta;
            // Limit the change to 20%
            if quotient > 1.2 {
                Some(1.2)
            } else if quotient < 0.8 {
                Some(0.8)
            } else {
                Some(quotient)
            }
        } else {
            None
        }
    }
/// Compute a scaling factor according to the desired acceptance.
Compute a scaling factor according to the desired acceptance.
Compute a scaling factor according to the desired acceptance .
pub fn scaling_factor(&self) -> Option<f64> {
        if let Some(ta) = self.target_acceptance {
            if self.attempted == 0 {
                return None;
            };
            let quotient = self.accepted as f64 / self.attempted as f64 / ta;
            // Limit the change to 20%
            if quotient > 1.2 {
                Some(1.2)
            } else if quotient < 0.8 {
                Some(0.8)
            } else {
                Some(quotient)
            }
        } else {
            None
        }
    }
pub fn scaling_factor ( & self ) -> Option < f64 > { if let Some ( ta ) = self . target_acceptance { if self . attempted == 0 { return None ; } ; let quotient = self . accepted as f64 / self . attempted as f64 / ta ; // Limit the change to 20% if quotient > 1.2 { Some ( 1.2 ) } else if quotient < 0.8 { Some ( 0.8 ) } else { Some ( quotient ) } } else { None } }
Compute a scaling factor according to the desired acceptance.
Compute a scaling factor according to the desired acceptance .
&self