public double Calculate(CongenericChain chain, Link link) { double depth = depthCalculator.Calculate(chain, link); int nj = (int)intervalsCount.Calculate(chain, link); return nj == 0 ? 0 : depth / nj; }
/// <summary> /// The calculate remoteness. /// </summary> public void CalculateRemoteness() { var calculator = new AverageRemoteness(); AvgRemoteness = calculator.Calculate(chain, Link.End); for (int i = 0; i < PLex.Capacity; i++) { PLex.Data[i].Remoteness = calculator.Calculate(chain.CongenericChain(i), Link.End); } }