public override double Calculate(BinaryIntervalsManager manager, Link link)
{
if (manager.FirstElement.Equals(manager.SecondElement))
{
return 0;
}
var involvedCoefficientCalculator = new InvolvedPartialDependenceCoefficient();
double firstInvolvedCoefficient = involvedCoefficientCalculator.Calculate(manager, link);
double secondInvolvedCoefficient = involvedCoefficientCalculator.Calculate(new BinaryIntervalsManager(manager.SecondChain, manager.FirstChain), link);
double multipliedInvolvedCoefficient = firstInvolvedCoefficient * secondInvolvedCoefficient;
return (firstInvolvedCoefficient < 0 || secondInvolvedCoefficient < 0) ? 0 : Math.Sqrt(multipliedInvolvedCoefficient);
}