aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/expression/minfunctionnode.h
blob: f1eed00f4283cc49a5665510062c33d65fdf2c8c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include "numericfunctionnode.h"

namespace search {
namespace expression {

class MinFunctionNode : public NumericFunctionNode
{
public:
    DECLARE_EXPRESSIONNODE(MinFunctionNode);
    MinFunctionNode() { }
private:
    void onArgument(const ResultNode & arg, ResultNode & result) const override;
    ResultNode & flatten(const ResultNodeVector & v, ResultNode & result) const override { return v.flattenMin(result); }
    ResultNode::CP getInitialValue() const override;
};

}
}