}
// "dv"
if (d1 != null && v2 != null)
return new DualFloatFunction(new LongConstValueSource(ms1), v2) {
@Override
protected String name() {
return "ms";
}
@Override
protected float func(int doc, DocValues aVals, DocValues bVals) {
return ms1 - bVals.longVal(doc);
}
};
// "vd"
if (v1 != null && d2 != null)
return new DualFloatFunction(v1, new LongConstValueSource(ms2)) {
@Override
protected String name() {
return "ms";
}
@Override
protected float func(int doc, DocValues aVals, DocValues bVals) {
return aVals.longVal(doc) - ms2;
}
};
// "vv"
if (v1 != null && v2 != null)
return new DualFloatFunction(v1, v2) {
@Override
protected String name() {
return "ms";
}