saveAdjacencyList

network.saveAdjacencyList(fileName)
Save the adjacency list of the network to a file.

Parameters

fileName: string
File name to which the adjacency list is written.

File Format

The text file will start with the number of nodes in the network. Afterwards for every connection, there is a line which contains the following three entries:

  • number of the source node,
  • number of the target node,
  • coupling strength.

Entries are seperated by spaces.

Example:

2
1 0 0.3
0 1 0.9

createFromAdjacencyList reads files in this format.

Example (python-conedy)

import conedy as co

N = co.network()


N.completeNetwork (10, co.node(), co.weightedEdge());

N.saveAdjacencyList("output/saveAdjacencyList.py.mat")
N.clear()
N.createFromAdjacencyList("output/saveAdjacencyList.py.mat")

N.saveAdjacencyList("output/saveAdjacencyList.py.mat2")

Example (conedy)

network N;

N.completeNetwork (10, co.node(), weightedEdge());

N.saveAdjacencyList("output/saveAdjacencyList.py.mat");
N.clear();
N.createFromAdjacencyList("output/saveAdjacencyList.py.mat");

N.saveAdjacencyList("output/saveAdjacencyList.py.mat2");

Table Of Contents

Previous topic

rewire

Next topic

saveAdjacencyMatrix