summaryrefslogtreecommitdiffstats
path: root/predicate-search/src/main/java/com/yahoo/search/predicate/annotator/PredicateTreeAnnotations.java
blob: dab67ff9ffa433d20d4b979a1f8f53aaa1494da9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.predicate.annotator;

import com.yahoo.search.predicate.index.IntervalWithBounds;
import com.yahoo.search.predicate.index.conjunction.IndexableFeatureConjunction;

import java.util.List;
import java.util.Map;

/**
 * Holds annotations for all the features of a predicate.
 * This is sufficient information to insert the predicate into a PredicateIndex.
 *
 * @author <a href="mailto:magnarn@yahoo-inc.com">Magnar Nedland</a>
 */
public class PredicateTreeAnnotations {
    public final int minFeature;
    public final int intervalEnd;
    public final Map<Long, List<Integer>> intervalMap;
    public final Map<Long, List<IntervalWithBounds>> boundsMap;
    public final Map<IndexableFeatureConjunction, List<Integer>> featureConjunctions;

    public PredicateTreeAnnotations(
            int minFeature,
            int intervalEnd,
            Map<Long, List<Integer>> intervalMap,
            Map<Long, List<IntervalWithBounds>> boundsMap,
            Map<IndexableFeatureConjunction, List<Integer>> featureConjunctions) {
        this.minFeature = minFeature;
        this.intervalEnd = intervalEnd;
        this.intervalMap = intervalMap;
        this.boundsMap = boundsMap;
        this.featureConjunctions = featureConjunctions;
    }
}