random number including 1 - i.e. [0,1]

Esmail ebonak at hotmail.com
Wed Jun 10 00:23:11 EDT 2009


Here is part of the specification of an algorithm I'm implementing that
shows the reason for my original query:

vid = w * vid + c1 * rand( ) * ( pid – xid ) + c2 * Rand( ) * (pgd –xid ) (1a)

xid = xid + vid (1b)

where c1 and c2 are two positive constants,
rand() and Rand() are two random functions in the range [0,1],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
and w is the inertia weight.




More information about the Python-list mailing list