randomizeWeights

network.randomizeWeights(distribution)
Randomizes connection strengths in the network.

Parameters

distribution: distribution
Pick edge weights from this distribution (see Randomizing node parameters).

Example (python-conedy)

import conedy as co

N = co.network()


N.cycle( 100, 1, co.node(), co.weightedEdge())

N.randomizeWeights(co.uniform(0.0,1.50))

print "should be close to 0.75:" + str (N.meanWeight())

Example (conedy)

network n;



n.cycle ( 100, 1,node(), weightedEdge());

n.randomizeWeights(uniform(0.0,1.50));

print "should be close to 0.75:"+ n.meanWeight()+ newline;

Table Of Contents

Previous topic

randomizeStates

Next topic

readInitialCondition