| 20 | // Compare two numbers |
| 21 | template<typename T> |
| 22 | bool assertNear(T x, T y, double tolAbs = 1e-8, double tolRel = 1e-8) |
| 23 | { |
| 24 | double dx = std::abs(x - y); |
| 25 | double xAbs = 0.5*(std::abs(x) + std::abs(y)); |
| 26 | double err = std::max(tolAbs, tolRel*xAbs); |
| 27 | return dx < err; |
| 28 | } |
| 29 | |
| 30 | std::vector<double> denseVectorToVector(const DenseVector &denseVec); |
| 31 |
no outgoing calls