[−][src]Struct horokai_network::Network
Definition of struct Network, the implementation of network in mathmatics.
Expression of network or graph is "The set of vertexes and the set of links which is pair of the vertex".
I use this index rule: the vertex is denoted by number 0 ~ n-1, n as the amount of the vertex.
So the expression of the struct Network becomes simple and smart.
Note : A famous way of the expression of network is adjacency matrix, but it use O(n^2) memory space.
I may prepare the access to the adjacency matrix bia function, but it is not inevitable.
Many of the calculation experiment program for the network dynamics like percolation is written with using edge list expression of the network, not adjacency matrix.
Adjacency matrix is used with the research of the behave of the eigenvalue, but I marely use it ( ; ; ).
Methods
impl Network
[src]
pub fn make_square_lattice(length: u32) -> Network
[src]
Create square lattice.
pub fn make_regular_lattice(dim: u32, length: u32) -> Network
[src]
Create regular lattice
pub fn make_regular_random_graph(n: u32, frac: f64, rng: &mut StdRng) -> Network
[src]
create regular random graph
pub fn exist_self_loop(&self) -> bool
[src]
Check of the self loop Calculation time is O(L).
pub fn exist_multi_loop(&self) -> bool
[src]
Check of the multi loop Caution : Calculation time is O(L^2), it can be vast time. Be careful.
pub fn show_network(&self)
[src]
impl Network
[src]
pub fn get_n(&self) -> u32
[src]
Get Network.n
pub fn get_edge_list(&self) -> Vec<(u32, u32)>
[src]
Get Network.edge_list
pub fn get_average_degree(&self) -> f64
[src]
Get average degree of the network Calculation time : O(1)
Trait Implementations
Auto Trait Implementations
impl Send for Network
impl Unpin for Network
impl Sync for Network
impl UnwindSafe for Network
impl RefUnwindSafe for Network
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,