public void IsMetThrowsForMissingCovarianceMatrix() { var terminationCriterion = new ConditionCov(); var data = ConditionCovTest.CreateCmaEsData(covariances: null); Assert.Throws <ArgumentOutOfRangeException>(() => terminationCriterion.IsMet(data)); }
public void IsMetReturnsFalseForMatrixWithMaxCondition() { var terminationCriterion = new ConditionCov(); var matrixWithMaxCondition = Matrix <double> .Build.DenseOfDiagonalArray( new[] { ConditionCov.MaxCondition * 10, 10 }); Assert.False( terminationCriterion.IsMet(ConditionCovTest.CreateCmaEsData(matrixWithMaxCondition)), "Termination criterion should not have been met."); }
public void IsMetThrowsForMissingCmaEsData() { var terminationCriterion = new ConditionCov(); Assert.Throws <ArgumentNullException>(() => terminationCriterion.IsMet(data: null)); }