当前位置: 首页>>代码示例>>Java>>正文


Java FilteredCombinationIterator类代码示例

本文整理汇总了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));
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:18,代码来源:FilteredCombinationIteratorTest.java

示例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());
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:20,代码来源:FilteredCombinationIteratorTest.java

示例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());
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:14,代码来源:FilteredCombinationIteratorTest.java

示例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());
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:12,代码来源:FilteredCombinationIteratorTest.java

示例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());
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:12,代码来源:FilteredCombinationIteratorTest.java


注:本文中的org.galagosearch.core.retrieval.structured.FilteredCombinationIterator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。