removeEdges

network.removeEdges(edge)
Remove all edges of a certain kind from the network.

Parameters

edge: edge template
Remove edges that match this template.

Example (python-conedy)

import conedy as co

n = co.network()

n.addNode (co.node())
n.addEdge (0,0,co.weightedEdge(1.0))
n.removeEdges(co.weightedEdge())
print "Should be 0:"
print n.meanDegree()
n.clear()


n.cycle( 10000, 2,  co.node(), co.staticWeightedEdge(1.0))


n.replaceEdges (0.5, co.weightedEdge())
print "Should be 4:"
print n.meanDegree()

n.removeEdges (co.weightedEdge())


print "Should be close to 2:"
print n.meanDegree()

Example (conedy)

network n;

n.addNode (node());
n.addEdge (0,0,weightedEdge(1.0));
n.removeEdges(weightedEdge);
print "Should be 0:";
print n.meanDegree();
print newline;
n.clear();


n.cycle( 10000, 2,  node(), staticWeightedEdge(1.0));


n.replaceEdges (0.5, weightedEdge);
print "Should be 4:";
print n.meanDegree();
print newline;

n.removeEdges (weightedEdge);


print "Should be close to 2:";
print n.meanDegree();
print newline;

Table Of Contents

Previous topic

removeEdge

Next topic

removeNodes