AIMA.Core.Learning.Learners.DecisionListLearner.getValidTest C# (CSharp) Method

getValidTest() private method

private getValidTest ( List possibleTests, DataSet ds ) : DLTest
possibleTests List
ds AIMA.Core.Learning.Framework.DataSet
return AIMA.Core.Learning.Inductive.DLTest
        private DLTest getValidTest(List<DLTest> possibleTests, DataSet ds) {
		foreach (DLTest test in possibleTests) {
			DataSet matched = test.matchedExamples(ds);
			if (!(matched.size() == 0)) {
				if (allExamplesHaveSameTargetValue(matched)) {
					return test;
				}
			}

		}
		return null;
	}