[go: up one dir, main page]

File: equal.cpp

package info (click to toggle)
iminuit 2.11.2-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,780 kB
  • sloc: cpp: 24,851; python: 6,975; makefile: 18
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