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])); }
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); } }