Networks

Description of the network object and attributes. This is a test to include the comments from the code.

nada

Network

class network(file_net=None, file_labels=None, net_format='text', labels_format='text', directed=True, kinetic=False, verbose=True)
Parameters:
  • file_net (str) – Input file with network (see formats)
  • file_labels (str) – Input file with labels for nodes (see formats)
  • net_format (str) – Format of input file: ‘text’,... (see formats)
  • labels_format (str) – Format of labels file: ‘text’,... (see formats)
  • directed (bool) – Network with directed links.
  • kinetic (bool) – Kinetic network. (see)
  • verbose (bool) – Printing out information about the loaded network.
Returns:

returns the object intialized.

Example :

(followed by a blank line)

network.node

List of nodes. Each node is an object of node class. (list)

network.num_nodes

Total number of nodes in the network. (int)

network.cluster

List of clusters. Each cluster is an object of cluster class. (list)

network.num_clusters

Total number of clusters detected in the network

network.component

List of components. Each component is an object of cluster class. (list)

network.num_components

Total number of components in the network

network.k_total

Total number of links. Degree of the network. (int)

network.k_max

Maximum number of links of a node. Maximum degree of a node. (int)

network.k_out

Total number of links out of nodes if the network is directed. (int)

network.k_in

Total number of links in of nodes if the network is directed. (int)

network.weight

Total weight of nodes if they are weighted. (int)

network.labels

Dictionary of with labels and indexes of nodes. (dict[str]=int)

network.directed

True if the links are directed. (bool)

network.kinetic

True if it has the properties of a Conformational Space Network, or kinetic network.

network.file_net

Name of input file with the network. (str)

network.file_labels

Name of input file with labels network. (str)

See also

blabla

Node

Nodes are represented by objects with the common attributes of class node:

node.label

Label of node. (str)

Dictionary of links with index of the destination node as key, and weight of link as value. (dict[int]=float)

node.k

Degree or number of links of node. (int)

node.k_out

Degree or number of links out of this node. If the network is directed. (int)

node.k_in

Degree or number of links in this node. If the network is directed. (int)

node.weight

Weight of node. If the network is weighted. (float)

node.cluster

Index of cluster to which the node belongs.

node.component

Index of component to which the node belongs.

node.coors

List of coordinates of this node for a graphical representation. (list[float])

node.color

Color of node in a graphical representation. (str,int,float...)

node.size

Size of network in a graphical representation. (int, float)

Cluster

Clusters are represented by objects with the common attributes of class cluster:

cluster.num_nodes

Number of nodes in the cluster. (int)

cluster.nodes

List of indexes of nodes which belong to the cluster. (list[int])

cluster.weight

Total weight of cluster if the nodes are weighted. (int)

cluster.label

Label of the cluster. Label of the most weighted node in the cluster -if the network is weighted-. (str)

Dictionary of links with the index of the destination cluster as key, and its weight as value. (dict[int]=float)

cluster.k

Degree or number of links of the cluster. (int)

cluster.k_out

Degree or number of links out of the cluster if the network is directed. (int)

cluster.k_in

Degree or number of links in the cluster if the network is directed. (int)

Component

Components are represented by objects with the common attributes of a cluster:

component.num_nodes

Number of nodes in the component. (int)

component.nodes

List of indexes of nodes which belong to the component. (list[int])

component.weight

Total weight of component if the nodes are weighted. (int)

component.label

Label of the component. Label of the most weighted node in the component -if the network is weighted-. (str)

Table Of Contents

Previous topic

Introduction

Next topic

Functions