Enum cnetworks::Model[][src]

pub enum Model {
    ER {
        p: f64,
        whole: bool,
    },
    BA {
        m0: usize,
        m: usize,
    },
    None,
}
Expand description

Model decides the algorithm used to connect the nodes during Network’s initialization.

Variants

ER

The Erdos–Renyi random network model.

Fields of ER

p: f64

The probability of connecting any given pair of nodes.

whole: bool

Should the network be in one piece

BA

The Barabasi–Albert preferential attachment model.

Fields of BA

m0: usize

The initial number of clustered nodes.

m: usize

The number of nodes added in each step during network creation. Keep in mind that this should be strictly less or equal m0 and the Barabasi-Albert initialization fuction will panic if this is not the case.

None

Placeholder for a network with no connections.

Implementations

Initialize (or reinitialize) the network’s links according to the Erdos-Renyi model. See the Model 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 before linking.

Initialize (or reinitialize) the network’s links according to the Barabasi-Albert model. See the Model for more detailed model explanation.

The links are cleared before re-linking because of the nature of initialization algorithm

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.