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

Function IsEqual

library/cpp/expression/expression.cpp:129–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129static bool IsEqual(const TString& a, const TString& b, const double eps) {
130 double aVal = 0.0;
131 double bVal = 0.0;
132 if (TryFromString<double>(a, aVal) && TryFromString<double>(b, bVal)) {
133 return fabs(aVal - bVal) < eps;
134 }
135 // okay, compare as strings
136 return a == b;
137}
138
139static TString CalcExpression(const char* expr, size_t a, size_t b, const IExpressionAdaptor& data) {
140 // Cannot compare values less than 1e-5

Callers 3

EMethod · 0.70
NeMethod · 0.70
CalcExpressionFunction · 0.70

Calls 1

fabsFunction · 0.85

Tested by

no test coverage detected