network.replaceNode(nodeNumber, node)
Replace node with number nodeNumber by a new node of which is a copy the template node


nodeNumber: int
The number of the node which is replaced.
node : nodeTemplate
The new node with number nodeNumber is a copy of this template

Example (python-conedy)

import conedy as co

n =

n.addNode (co.node())

n.removeNodes (co.roessler())

print "Should be 1:" + str(n.numberVertices())

n.replaceNode (0, co.roessler())
n.removeNodes (co.roessler())

print "Should be 0:" + str(n.numberVertices())

Example (conedy)

network n;

n.addNode (node());

n.removeNodes (roessler());

print "Should be 1:" + n.numberVertices() + newline ;

n.replaceNode (0, roessler());
n.removeNodes (roessler());

print "Should be 0:" + n.numberVertices() + newline ;

Table Of Contents

Previous topic


Next topic