Enum cnetworks::Weight [−][src]
pub enum Weight {
Constant {
c: f64,
},
Uniform,
None,
}
Expand description
Weight
determines the weight of each link in the network (ie. the probability of the
infection spreading through it in each time step).
Variants
The probability should be constant end equalt to c
. Keep in mind that 0 < c <= 1, the
Network::new()
constructor will panic if that is not the case.
Fields of Constant
c: f64
A weight sampled uniformly from (0, 1).
For when the link weight does not matter, treated like Weight::Constant { c: 1.0 }
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Weight
impl UnwindSafe for Weight
Blanket Implementations
Mutably borrows from an owned value. Read more