MCPcopy Create free account
hub / github.com/Gecode/gecode / abs

Function abs

gecode/minimodel/int-arith.cpp:299–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297namespace Gecode {
298
299 LinIntExpr
300 abs(const LinIntExpr& e) {
301 using namespace MiniModel;
302 if (hasType(e, ArithNonLinIntExpr::ANLE_ABS))
303 return e;
304 ArithNonLinIntExpr* ae =
305 new ArithNonLinIntExpr(ArithNonLinIntExpr::ANLE_ABS,1);
306 ae->a[0] = e;
307 return LinIntExpr(ae);
308 }
309
310 LinIntExpr
311 min(const LinIntExpr& e0, const LinIntExpr& e1) {

Callers 1

postFunction · 0.70

Calls 2

LinIntExprClass · 0.85
hasTypeFunction · 0.70

Tested by

no test coverage detected