blob: 1d17df05e5b6e4c42b099a8fe36d4ebb9ba0fc56 (
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
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchlib.expression;
/**
* This function is an instruction to modulo the arguments in order.
*
* @author baldersheim
* @author Simon Thoresen Hult
*/
public class ModuloFunctionNode extends NumericFunctionNode {
public static final int classId = registerClass(0x4000 + 64, ModuloFunctionNode.class, ModuloFunctionNode::new);
@Override
protected int onGetClassId() {
return classId;
}
@Override
protected void onArgument(final ResultNode arg, ResultNode result) {
((NumericResultNode)result).modulo(arg);
}
}
|