ckrbd.js
//sums hops between i,j and 100 random nodes in window whose top left is si,sj and of width==height = slength
sums hops between i,j and 100 random nodes in window whose top left is si,sj and of width==height = slength
sums hops between i j and 100 random nodes in window whose top left is si sj and of width == height = slength
function sumHopDistance(i,j,si,sj,slength,shotSize) {
    var sum=0;
    for (var n=0;n<shotSize;n++) sum += hopDistance(i,j,si+Math.floor(Math.random()*slength),sj+Math.floor(Math.random()*slength) );
    return sum;
}
function sumHopDistance ( i , j , si , sj , slength , shotSize ) { var sum = 0 ; for ( var n = 0 ; n < shotSize ; n ++ ) sum += hopDistance ( i , j , si + Math . floor ( Math . random ( ) * slength ) , sj + Math . floor ( Math . random ( ) * slength ) ) ; return sum ; }
sums hops between i,j and 100 random nodes in window whose top left is si,sj and of width==height = slength
sums hops between i j and 100 random nodes in window whose top left is si sj and of width == height = slength