Beispiel #1
0
        private double Strength(int i)
        {
            LinkInfo link = links[i];

            if (strengthCall != null)
            {
                return(strengthCall.Invoke(link));
            }
            return(1 / Mathf.Min((float)count[link.from.index], (float)count[link.to.index]));
        }
Beispiel #2
0
        private double Distance(int i)
        {
            LinkInfo link     = links[i];
            double   distance = -1;

            if (distanceCall != null)
            {
                distance = distanceCall.Invoke(link);
            }
            if (distance < 0)
            {
                return(DEFAULT_DISTANCE);
            }
            else
            {
                return(distance);
            }
        }