[go: up one dir, main page]

File: equal.cpp

package info (click to toggle)
iminuit 2.30.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,660 kB
  • sloc: cpp: 14,591; python: 11,177; makefile: 11; sh: 5
file content (12 lines) | stat: -rw-r--r-- 328 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
#include "equal.hpp"
#include <algorithm>
#include <cmath>
#include <vector>

bool nan_equal(double a, double b) { return std::isnan(a) == std::isnan(b) || a == b; }

namespace std {
bool operator==(const vector<double>& a, const vector<double>& b) {
  return equal(a.begin(), a.end(), b.begin(), b.end());
}
} // namespace std