* Implementation of GiNaC's symmetry definitions. */
/*
- * GiNaC Copyright (C) 1999-2006 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2007 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include <iostream>
#include <stdexcept>
#include <functional>
+#include <limits>
#include "symmetry.h"
#include "lst.h"
{
// Less than two elements? Then do nothing
if (symm.indices.size() < 2)
- return INT_MAX;
+ return std::numeric_limits<int>::max();
// Canonicalize children first
bool something_changed = false;
int child_sign = canonicalize(v, ex_to<symmetry>(*first));
if (child_sign == 0)
return 0;
- if (child_sign != INT_MAX) {
+ if (child_sign != std::numeric_limits<int>::max()) {
something_changed = true;
sign *= child_sign;
}
default:
break;
}
- return something_changed ? sign : INT_MAX;
+ return something_changed ? sign : std::numeric_limits<int>::max();
}