Enum cnetworks::Model [−][src]
Expand description
Decides the algorithm used to connect the nodes during Network
’s initialization. It can
also be used for identification purposes when the Model::Custom
variant is used.
Variants
The Erdos–Renyi random network model.
Fields of ER
The Barabasi–Albert preferential attachment model.
Fields of BA
Custom(String)
Custom model, can be dynamically assigned to a network using Network::set_model
.
Tuple Fields of Custom
0: String
Placeholder for a network with no specified model. When a network is initialized with this model no immediate connections will be made.
Implementations
Initialize (or reinitialize) the network’s links according to the Erdos-Renyi model.
See Model::ER
for more detailed explanation.
If whole
is true
then the network is artificially stitched together after
initialization, otherwise there is no guarantee that there are no ‘outsiders’ or even
separate networks.
Beware that the network is not cleared, hence any existing links will remain.
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 Model
impl UnwindSafe for Model
Blanket Implementations
Mutably borrows from an owned value. Read more