numberVertices

size()
returns the network’s number of nodes.

Example (python-conedy)

import conedy as co

N = co.network()

N.lattice(40, 40, 1.5, co.node(),co.weightedEdge())
print "should be 1600: " + str(N.numberVertices())

N.clear()
N.cycle(50, 3, co.node(), co.weightedEdge() )
print "should be 50: " + str(N.numberVertices())

Example (conedy)

network N;

N.lattice(20, 20, 1.5, roessler());
print "Should be 400: " + N.numberVertices() + newline;

N.clear();
N.cycle(40, 2, kuramoto());
print "Should be 40: " + N.numberVertices() + newline;

Table Of Contents

Previous topic

normalizeOutputs

Next topic

randomNetwork