blob: a4248245f2ab56c648c9f69254aa89a58d1098a3 (
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
36
37
38
39
40
41
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude.fastsearch;
import com.yahoo.tensor.TensorType;
import java.util.Map;
/**
* Information about a rank profile
*
* @author bratseth
*/
class RankProfile {
private final String name;
private final boolean hasSummaryFeatures;
private final boolean hasRankFeatures;
private final Map<String, TensorType> inputs;
public RankProfile(String name,
boolean hasSummaryFeatures,
boolean hasRankFeatures,
Map<String, TensorType> inputs) {
this.name = name;
this.hasSummaryFeatures = hasSummaryFeatures;
this.hasRankFeatures = hasRankFeatures;
this.inputs = Map.copyOf(inputs);
}
public String getName() { return name; }
/** Returns true if this rank profile has summary features. */
public boolean hasSummaryFeatures() { return hasSummaryFeatures; }
/** Returns true if this rank profile has rank features. */
public boolean hasRankFeatures() { return hasRankFeatures; }
/** Returns the inputs explicitly declared in this rank profile. */
public Map<String, TensorType> inputs() { return inputs; }
}
|