MCPcopy Create free account
hub / github.com/catboost/catboost / Cond

Method Cond

library/cpp/expression/expression_variable.cpp:144–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142 return !(IsZeroDoubleValue() || secondOperand.IsZeroDoubleValue());
143}
144double TExpressionVariable::Cond(const TExpressionVariable& secondOperand, const TExpressionVariable& u) const {
145 return !IsZeroDoubleValue() ? secondOperand.ToDouble() : u.ToDouble();
146}
147double TExpressionVariable::E(const TExpressionVariable& secondOperand) const {
148 return IsEqual(secondOperand, EPS) ? 1.0 : 0.0;
149}

Callers 2

CalcVariantExpressionMethod · 0.80
Y_UNIT_TESTFunction · 0.80

Calls 1

ToDoubleMethod · 0.45

Tested by

no test coverage detected