private ExpressionNode createGBDTNode(IfNode cNode,ContextIndex context) {
        List<Double> values = new ArrayList<>();
        try {
            consumeNode(cNode, values, context);
        }
        catch (IllegalArgumentException e) { // Conversion was impossible
            report.note("Skipped optimization: " + Exceptions.toMessageString(e) + ". Expression: " + cNode);
            return cNode;
        }
        report.incMetric("Optimized GDBT trees",1);
        return new GBDTNode(toArray(values));
    }
<p>Recursively optimize nodes of the form ArithmeticNode(IfNode,ArithmeticNode(IfNode)) etc., ignore
anything else.</p>

<p>Each condition node is converted to the double sequence [(OperatorIsEquals ? GBDTNode.MAX_VARIABLES : 0) +
IndexOfLeftComparisonFeature+GBDTNode.MAX_LEAF_VALUE, ValueOfRightComparisonValue,#OfValuesInTrueBranch,true
branch values,false branch values]</p>

<p>Each value node is converted to the double value of the value node itself.</p>

@return the optimized expression
searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/evaluation/gbdtoptimization/GBDTOptimizer.java