本文整理汇总了Java中org.galagosearch.core.retrieval.structured.FilteredCombinationIterator类的典型用法代码示例。如果您正苦于以下问题:Java FilteredCombinationIterator类的具体用法?Java FilteredCombinationIterator怎么用?Java FilteredCombinationIterator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FilteredCombinationIterator类属于org.galagosearch.core.retrieval.structured包,在下文中一共展示了FilteredCombinationIterator类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testHasMatch
import org.galagosearch.core.retrieval.structured.FilteredCombinationIterator; //导入依赖的package包/类
public void testHasMatch() throws IOException {
FakeScoreIterator one = new FakeScoreIterator(docsA, scoresA);
FakeScoreIterator two = new FakeScoreIterator(docsB, scoresB);
FakeScoreIterator[] iterators = { one, two };
Parameters anyParameters = new Parameters();
FilteredCombinationIterator instance = new FilteredCombinationIterator(anyParameters,
iterators);
assertFalse(instance.hasMatch(1));
assertFalse(instance.hasMatch(2));
assertFalse(instance.hasMatch(3));
assertFalse(instance.hasMatch(10));
instance.moveTo(10);
assertTrue(instance.hasMatch(10));
}
示例2: testScore
import org.galagosearch.core.retrieval.structured.FilteredCombinationIterator; //导入依赖的package包/类
public void testScore() throws IOException {
FakeScoreIterator one = new FakeScoreIterator(docsA, scoresA);
FakeScoreIterator two = new FakeScoreIterator(docsB, scoresB);
FakeScoreIterator[] iterators = { one, two };
Parameters anyParameters = new Parameters();
ScoreCombinationIterator instance = new FilteredCombinationIterator(anyParameters, iterators);
for (int i = 0; i < docsTogether.length; i++) {
assertFalse(instance.isDone());
instance.moveTo(docsTogether[i]);
assertTrue(instance.hasMatch(docsTogether[i]));
assertEquals(scoresTogether[i], instance.score(docsTogether[i], 100));
instance.movePast(docsTogether[i]);
}
assertTrue(instance.isDone());
}
示例3: testNextCandidate
import org.galagosearch.core.retrieval.structured.FilteredCombinationIterator; //导入依赖的package包/类
public void testNextCandidate() throws IOException {
FakeScoreIterator one = new FakeScoreIterator(docsA, scoresA);
FakeScoreIterator two = new FakeScoreIterator(docsB, scoresB);
FakeScoreIterator[] iterators = { one, two };
Parameters filterParameters = new Parameters();
ScoreCombinationIterator instance = new FilteredCombinationIterator(filterParameters,
iterators);
assertEquals(5, instance.nextCandidate());
instance.movePast(10);
assertEquals(15, instance.nextCandidate());
}
示例4: testMovePast
import org.galagosearch.core.retrieval.structured.FilteredCombinationIterator; //导入依赖的package包/类
public void testMovePast() throws Exception {
FakeScoreIterator one = new FakeScoreIterator(docsA, scoresA);
FakeScoreIterator two = new FakeScoreIterator(docsB, scoresB);
FakeScoreIterator[] iterators = { one, two };
Parameters anyParameters = new Parameters();
ScoreCombinationIterator instance = new FilteredCombinationIterator(anyParameters, iterators);
instance.movePast(5);
assertEquals(10, instance.nextCandidate());
}
示例5: testMoveTo
import org.galagosearch.core.retrieval.structured.FilteredCombinationIterator; //导入依赖的package包/类
public void testMoveTo() throws Exception {
FakeScoreIterator one = new FakeScoreIterator(docsA, scoresA);
FakeScoreIterator two = new FakeScoreIterator(docsB, scoresB);
FakeScoreIterator[] iterators = { one, two };
Parameters anyParameters = new Parameters();
ScoreCombinationIterator instance = new FilteredCombinationIterator(anyParameters, iterators);
instance.moveTo(5);
assertEquals(6, instance.nextCandidate());
}