1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
//! //! # Define struct Network for graph theory //! //! This is my experimental project to use Rust for numerical calculation of complex network theory. //! //! ## struct Network is the universe of the graph system //! The struct Network is the universe of the system in mathmatics literature. //! This struct is the simplest expression of the network or graph. See pages of the struct Network. //! Functions exist to manage the struct Network. //! This is the design of this crate. //! mod create; mod get; /// /// # 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 vertexes. /// 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. /// #[derive(Clone)] pub struct Network { n: u32, edge_list: Vec<(u32, u32)>, }