コード例 #1
0
        public void ShouldCalculateEffectivenessWithNoInvertedIndex()
        {
            IDictionary   indexes       = new HashDictionary();
            BetweenFilter filter        = new BetweenFilter(m_extractor, 10, 20);
            var           effectiveness = filter.CalculateEffectiveness(indexes, s_setKeys);

            Assert.AreEqual(ExtractorFilter.EVAL_COST * s_setKeys.Count, effectiveness);
        }
コード例 #2
0
        public void ShouldCalculateEffectivenessWhenInvertedIndexIsPlainSet()
        {
            IDictionary indexes = new HashDictionary();

            indexes[m_extractor] = s_sortedIndex;

            BetweenFilter filter        = new BetweenFilter(m_extractor, 10, 20);
            var           effectiveness = filter.CalculateEffectiveness(indexes, s_setKeys);

            Assert.AreEqual(s_sortedIndex.IndexContents.Count, effectiveness);
        }