Blame elements-alexandria_arch.patch

08be912
diff --git a/GridContainer/tests/src/GridContainer_test.cpp b/GridContainer/tests/src/GridContainer_test.cpp
08be912
index 9ca75c0..f4c3814 100644
08be912
--- a/GridContainer/tests/src/GridContainer_test.cpp
08be912
+++ b/GridContainer/tests/src/GridContainer_test.cpp
08be912
@@ -1,22 +1,22 @@
08be912
 /*
08be912
- * Copyright (C) 2012-2020 Euclid Science Ground Segment    
08be912
- *  
08be912
+ * Copyright (C) 2012-2020 Euclid Science Ground Segment
08be912
+ *
08be912
  * This library is free software; you can redistribute it and/or modify it under
08be912
- * the terms of the GNU Lesser General Public License as published by the Free 
08be912
- * Software Foundation; either version 3.0 of the License, or (at your option)  
08be912
- * any later version.  
08be912
- *  
08be912
- * This library is distributed in the hope that it will be useful, but WITHOUT 
08be912
+ * the terms of the GNU Lesser General Public License as published by the Free
08be912
+ * Software Foundation; either version 3.0 of the License, or (at your option)
08be912
+ * any later version.
08be912
+ *
08be912
+ * This library is distributed in the hope that it will be useful, but WITHOUT
08be912
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
08be912
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more  
08be912
- * details.  
08be912
- *  
08be912
- * You should have received a copy of the GNU Lesser General Public License 
08be912
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
08be912
+ * details.
08be912
+ *
08be912
+ * You should have received a copy of the GNU Lesser General Public License
08be912
  * along with this library; if not, write to the Free Software Foundation, Inc.,
08be912
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA  
08be912
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
08be912
  */
08be912
- 
08be912
- /** 
08be912
+
08be912
+ /**
08be912
  * @file GridContainer_test.cpp
08be912
  * @date July 4, 2014
08be912
  * @author Nikolaos Apostolakos
08be912
@@ -25,8 +25,11 @@
08be912
 #include <vector>
08be912
 #include <boost/test/unit_test.hpp>
08be912
 #include <boost/test/test_tools.hpp>
08be912
+#include <ElementsKernel/Real.h>
08be912
 #include "GridContainer/GridContainer.h"
08be912
 
08be912
+using Elements::isEqual;
08be912
+
08be912
 struct GridContainer_Fixture {
08be912
   typedef Euclid::GridContainer::GridContainer<std::vector<double>, int, int, int, int> GridContainerType;
08be912
   typedef Euclid::GridContainer::GridAxis<int> IntAxis;
08be912
@@ -45,13 +48,13 @@ BOOST_AUTO_TEST_SUITE (GridContainer_test)
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test construction with GridAxis objects
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(GridAxisConstructor, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // When
08be912
   GridContainerType result_grid {axis1, axis2, axis3, axis4};
08be912
   auto& result_axes_tuple = result_grid.getAxesTuple();
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_EQUAL(result_grid.size(), total_size);
08be912
   for (auto& value : result_grid) {
08be912
@@ -73,19 +76,19 @@ BOOST_FIXTURE_TEST_CASE(GridAxisConstructor, GridContainer_Fixture) {
08be912
   BOOST_CHECK_EQUAL_COLLECTIONS(
08be912
       std::get<3>(result_axes_tuple).begin(), std::get<3>(result_axes_tuple).end(),
08be912
       axis4.begin(), axis4.end());
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test construction with GridAxis tuple
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(GridAxisTupleonstructor, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // When
08be912
   GridContainerType result_grid {axes_tuple};
08be912
   auto& result_axes_tuple = result_grid.getAxesTuple();
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_EQUAL(result_grid.size(), total_size);
08be912
   for (auto& value : result_grid) {
08be912
@@ -107,137 +110,137 @@ BOOST_FIXTURE_TEST_CASE(GridAxisTupleonstructor, GridContainer_Fixture) {
08be912
   BOOST_CHECK_EQUAL_COLLECTIONS(
08be912
       std::get<3>(result_axes_tuple).begin(), std::get<3>(result_axes_tuple).end(),
08be912
       axis4.begin(), axis4.end());
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test the rank method
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(rank, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // When
08be912
   GridContainerType grid {axes_tuple};
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_EQUAL(grid.axisNumber(), 4u);
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test the getAxis method
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(getAxis, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // When
08be912
   GridContainerType grid {axes_tuple};
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_EQUAL(grid.getAxis<0>().name(), axis1.name());
08be912
   BOOST_CHECK_EQUAL(grid.getAxis<1>().name(), axis2.name());
08be912
   BOOST_CHECK_EQUAL(grid.getAxis<2>().name(), axis3.name());
08be912
   BOOST_CHECK_EQUAL(grid.getAxis<3>().name(), axis4.name());
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test the size method
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(size, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // When
08be912
   GridContainerType grid {axes_tuple};
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_EQUAL(grid.size(), total_size);
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test the parenthesis operator
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(parenthesisOperator, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   const GridContainerType& const_grid = grid;
08be912
-  
08be912
+
08be912
   // When
08be912
   double custom_value = 0;
08be912
   for (auto& cell : grid) {
08be912
     custom_value += 0.1;
08be912
     cell = custom_value;
08be912
   }
08be912
-  
08be912
+
08be912
   // Then
08be912
   double expected_value {0};
08be912
-  for (size_t coord4=0; coord4
08be912
-    for (size_t coord3=0; coord3
08be912
-      for (size_t coord2=0; coord2
08be912
-        for (size_t coord1=0; coord1
08be912
+  for (size_t coord4 = 0; coord4 < axis4.size(); ++coord4) {
08be912
+    for (size_t coord3 = 0; coord3 < axis3.size(); ++coord3) {
08be912
+      for (size_t coord2 = 0; coord2 < axis2.size(); ++coord2) {
08be912
+        for (size_t coord1 = 0; coord1 < axis1.size(); ++coord1) {
08be912
           expected_value += 0.1;
08be912
-          BOOST_CHECK_EQUAL(grid(coord1, coord2, coord3, coord4), expected_value);
08be912
-          BOOST_CHECK_EQUAL(const_grid(coord1, coord2, coord3, coord4), expected_value);
08be912
+          BOOST_CHECK_CLOSE(grid(coord1, coord2, coord3, coord4), expected_value, 1e-6);
08be912
+          BOOST_CHECK_CLOSE(const_grid(coord1, coord2, coord3, coord4), expected_value, 1e-6);
08be912
         }
08be912
       }
08be912
     }
08be912
   }
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test the at method
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(at, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   const GridContainerType& const_grid = grid;
08be912
-  
08be912
+
08be912
   // When
08be912
   double custom_value = 0;
08be912
   for (auto& cell : grid) {
08be912
     custom_value += 0.1;
08be912
     cell = custom_value;
08be912
   }
08be912
-  
08be912
+
08be912
   // Then
08be912
   double expected_value {0};
08be912
-  for (size_t coord4=0; coord4
08be912
-    for (size_t coord3=0; coord3
08be912
-      for (size_t coord2=0; coord2
08be912
-        for (size_t coord1=0; coord1
08be912
+  for (size_t coord4 = 0; coord4 < axis4.size(); ++coord4) {
08be912
+    for (size_t coord3 = 0; coord3 < axis3.size(); ++coord3) {
08be912
+      for (size_t coord2 = 0; coord2 < axis2.size(); ++coord2) {
08be912
+        for (size_t coord1 = 0; coord1 < axis1.size(); ++coord1) {
08be912
           expected_value += 0.1;
08be912
-          BOOST_CHECK_EQUAL(grid.at(coord1, coord2, coord3, coord4), expected_value);
08be912
-          BOOST_CHECK_EQUAL(const_grid.at(coord1, coord2, coord3, coord4), expected_value);
08be912
+          BOOST_CHECK_CLOSE(grid.at(coord1, coord2, coord3, coord4), expected_value, 1e-6);
08be912
+          BOOST_CHECK_CLOSE(const_grid.at(coord1, coord2, coord3, coord4), expected_value, 1e-6);
08be912
         }
08be912
       }
08be912
     }
08be912
   }
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test the at method throws for out of bound
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(atOutOfBound, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   const GridContainerType& const_grid = grid;
08be912
-  
08be912
+
08be912
   // When
08be912
   double custom_value = 0;
08be912
   for (auto& cell : grid) {
08be912
     custom_value += 0.1;
08be912
     cell = custom_value;
08be912
   }
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_THROW(grid.at(axis1.size(), 0, 0, 0), Elements::Exception);
08be912
   BOOST_CHECK_THROW(grid.at(0, axis2.size(), 0, 0), Elements::Exception);
08be912
@@ -247,54 +250,54 @@ BOOST_FIXTURE_TEST_CASE(atOutOfBound, GridContainer_Fixture) {
08be912
   BOOST_CHECK_THROW(const_grid.at(0, axis2.size(), 0, 0), Elements::Exception);
08be912
   BOOST_CHECK_THROW(const_grid.at(0, 0, axis3.size(), 0), Elements::Exception);
08be912
   BOOST_CHECK_THROW(const_grid.at(0, 0, 0, axis4.size()), Elements::Exception);
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test the iterator
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(iterator, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   const GridContainerType& const_grid = grid;
08be912
-  
08be912
+
08be912
   // When
08be912
   double custom_value = 0;
08be912
   for (auto& cell : grid) {
08be912
     custom_value += 0.1;
08be912
     cell = custom_value;
08be912
   }
08be912
-  
08be912
+
08be912
   // Then
08be912
   double expected_value {0};
08be912
   for (auto& result_value : grid) {
08be912
     expected_value += 0.1;
08be912
-    BOOST_CHECK_EQUAL(result_value, expected_value);
08be912
+    BOOST_CHECK_CLOSE(result_value, expected_value, 1e-6);
08be912
   }
08be912
   expected_value = 0;
08be912
   for (auto& result_value : const_grid) {
08be912
     expected_value += 0.1;
08be912
-    BOOST_CHECK_EQUAL(result_value, expected_value);
08be912
+    BOOST_CHECK_CLOSE(result_value, expected_value, 1e-6);
08be912
   }
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test the iterators axisIndex
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(iteratorAxisIndex, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   const GridContainerType& const_grid = grid;
08be912
-  
08be912
+
08be912
   // When
08be912
   auto iterator = grid.begin();
08be912
   auto const_iterator = const_grid.begin();
08be912
-  
08be912
+
08be912
   // Then
08be912
   for (size_t coord4=0; coord4
08be912
     for (size_t coord3=0; coord3
08be912
@@ -322,23 +325,23 @@ BOOST_FIXTURE_TEST_CASE(iteratorAxisIndex, GridContainer_Fixture) {
08be912
       }
08be912
     }
08be912
   }
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test the iterators axisValue
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(iteratorAxisValue, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   const GridContainerType& const_grid = grid;
08be912
-  
08be912
+
08be912
   // When
08be912
   auto iterator = grid.begin();
08be912
   auto const_iterator = const_grid.begin();
08be912
-  
08be912
+
08be912
   // Then
08be912
   for (size_t coord4=0; coord4
08be912
     for (size_t coord3=0; coord3
08be912
@@ -366,27 +369,27 @@ BOOST_FIXTURE_TEST_CASE(iteratorAxisValue, GridContainer_Fixture) {
08be912
       }
08be912
     }
08be912
   }
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test fixing iterator by index
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(fixIteratorByIndex, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   const GridContainerType& const_grid = grid;
08be912
-  
08be912
+
08be912
   for (size_t fixed_index=0; fixed_index
08be912
-    
08be912
+
08be912
     // When
08be912
     auto iterator = grid.begin();
08be912
     iterator.fixAxisByIndex<0>(fixed_index);
08be912
     auto const_iterator = const_grid.begin();
08be912
     const_iterator.fixAxisByIndex<0>(fixed_index);
08be912
-    
08be912
+
08be912
     // Then
08be912
     for (size_t coord4 = 0; coord4 < axis4.size(); ++coord4) {
08be912
       for (size_t coord3 = 0; coord3 < axis3.size(); ++coord3) {
08be912
@@ -410,17 +413,17 @@ BOOST_FIXTURE_TEST_CASE(fixIteratorByIndex, GridContainer_Fixture) {
08be912
         }
08be912
       }
08be912
     }
08be912
-    
08be912
+
08be912
   }
08be912
-  
08be912
+
08be912
   for (size_t fixed_index=0; fixed_index
08be912
-    
08be912
+
08be912
     // When
08be912
     auto iterator = grid.begin();
08be912
     iterator.fixAxisByIndex<1>(fixed_index);
08be912
     auto const_iterator = const_grid.begin();
08be912
     const_iterator.fixAxisByIndex<1>(fixed_index);
08be912
-    
08be912
+
08be912
     // Then
08be912
     for (size_t coord4 = 0; coord4 < axis4.size(); ++coord4) {
08be912
       for (size_t coord3 = 0; coord3 < axis3.size(); ++coord3) {
08be912
@@ -444,17 +447,17 @@ BOOST_FIXTURE_TEST_CASE(fixIteratorByIndex, GridContainer_Fixture) {
08be912
         }
08be912
       }
08be912
     }
08be912
-    
08be912
+
08be912
   }
08be912
-  
08be912
+
08be912
   for (size_t fixed_index=0; fixed_index
08be912
-    
08be912
+
08be912
     // When
08be912
     auto iterator = grid.begin();
08be912
     iterator.fixAxisByIndex<2>(fixed_index);
08be912
     auto const_iterator = const_grid.begin();
08be912
     const_iterator.fixAxisByIndex<2>(fixed_index);
08be912
-    
08be912
+
08be912
     // Then
08be912
     for (size_t coord4 = 0; coord4 < axis4.size(); ++coord4) {
08be912
       for (size_t coord2 = 0; coord2 < axis2.size(); ++coord2) {
08be912
@@ -478,17 +481,17 @@ BOOST_FIXTURE_TEST_CASE(fixIteratorByIndex, GridContainer_Fixture) {
08be912
         }
08be912
       }
08be912
     }
08be912
-    
08be912
+
08be912
   }
08be912
-  
08be912
+
08be912
   for (size_t fixed_index=0; fixed_index
08be912
-    
08be912
+
08be912
     // When
08be912
     auto iterator = grid.begin();
08be912
     iterator.fixAxisByIndex<3>(fixed_index);
08be912
     auto const_iterator = const_grid.begin();
08be912
     const_iterator.fixAxisByIndex<3>(fixed_index);
08be912
-    
08be912
+
08be912
     // Then
08be912
     for (size_t coord3 = 0; coord3 < axis3.size(); ++coord3) {
08be912
       for (size_t coord2 = 0; coord2 < axis2.size(); ++coord2) {
08be912
@@ -512,25 +515,25 @@ BOOST_FIXTURE_TEST_CASE(fixIteratorByIndex, GridContainer_Fixture) {
08be912
         }
08be912
       }
08be912
     }
08be912
-    
08be912
+
08be912
   }
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test fixing iterator index out of bound exception
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(fixIteratorByIndexOutOfBound, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   const GridContainerType& const_grid = grid;
08be912
-  
08be912
+
08be912
   // When
08be912
   auto iterator = grid.begin();
08be912
   auto const_iterator = const_grid.begin();
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_THROW(iterator.fixAxisByIndex<0>(axis1.size()), Elements::Exception);
08be912
   BOOST_CHECK_THROW(iterator.fixAxisByIndex<1>(axis2.size()), Elements::Exception);
08be912
@@ -540,25 +543,25 @@ BOOST_FIXTURE_TEST_CASE(fixIteratorByIndexOutOfBound, GridContainer_Fixture) {
08be912
   BOOST_CHECK_THROW(const_iterator.fixAxisByIndex<1>(axis2.size()), Elements::Exception);
08be912
   BOOST_CHECK_THROW(const_iterator.fixAxisByIndex<2>(axis3.size()), Elements::Exception);
08be912
   BOOST_CHECK_THROW(const_iterator.fixAxisByIndex<3>(axis4.size()), Elements::Exception);
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test fixing iterator by index twice for same axis throws exception
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(fixIteratorByIndexTwiceForSameAxis, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   const GridContainerType& const_grid = grid;
08be912
-  
08be912
+
08be912
   // When
08be912
   auto iterator = grid.begin().fixAxisByIndex<0>(0).fixAxisByIndex<1>(0)
08be912
                               .fixAxisByIndex<2>(0).fixAxisByIndex<3>(0);
08be912
   auto const_iterator = const_grid.begin().fixAxisByIndex<0>(0).fixAxisByIndex<1>(0)
08be912
                                           .fixAxisByIndex<2>(0).fixAxisByIndex<3>(0);
08be912
-  
08be912
+
08be912
   // Then
08be912
   iterator.fixAxisByIndex<0>(0);
08be912
   iterator.fixAxisByIndex<1>(0);
08be912
@@ -568,27 +571,27 @@ BOOST_FIXTURE_TEST_CASE(fixIteratorByIndexTwiceForSameAxis, GridContainer_Fixtur
08be912
   const_iterator.fixAxisByIndex<1>(0);
08be912
   BOOST_CHECK_THROW(const_iterator.fixAxisByIndex<2>(1), Elements::Exception);
08be912
   BOOST_CHECK_THROW(const_iterator.fixAxisByIndex<3>(1), Elements::Exception);
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test fixing iterator by value
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(fixIteratorByValue, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   const GridContainerType& const_grid = grid;
08be912
-  
08be912
+
08be912
   for (size_t fixed_index=0; fixed_index
08be912
-    
08be912
+
08be912
     // When
08be912
     auto iterator = grid.begin();
08be912
     iterator.fixAxisByValue<0>(axis1[fixed_index]);
08be912
     auto const_iterator = const_grid.begin();
08be912
     const_iterator.fixAxisByValue<0>(axis1[fixed_index]);
08be912
-    
08be912
+
08be912
     // Then
08be912
     for (size_t coord4 = 0; coord4 < axis4.size(); ++coord4) {
08be912
       for (size_t coord3 = 0; coord3 < axis3.size(); ++coord3) {
08be912
@@ -612,17 +615,17 @@ BOOST_FIXTURE_TEST_CASE(fixIteratorByValue, GridContainer_Fixture) {
08be912
         }
08be912
       }
08be912
     }
08be912
-    
08be912
+
08be912
   }
08be912
-  
08be912
+
08be912
   for (size_t fixed_index=0; fixed_index
08be912
-    
08be912
+
08be912
     // When
08be912
     auto iterator = grid.begin();
08be912
     iterator.fixAxisByValue<1>(axis2[fixed_index]);
08be912
     auto const_iterator = const_grid.begin();
08be912
     const_iterator.fixAxisByValue<1>(axis2[fixed_index]);
08be912
-    
08be912
+
08be912
     // Then
08be912
     for (size_t coord4 = 0; coord4 < axis4.size(); ++coord4) {
08be912
       for (size_t coord3 = 0; coord3 < axis3.size(); ++coord3) {
08be912
@@ -646,17 +649,17 @@ BOOST_FIXTURE_TEST_CASE(fixIteratorByValue, GridContainer_Fixture) {
08be912
         }
08be912
       }
08be912
     }
08be912
-    
08be912
+
08be912
   }
08be912
-  
08be912
+
08be912
   for (size_t fixed_index=0; fixed_index
08be912
-    
08be912
+
08be912
     // When
08be912
     auto iterator = grid.begin();
08be912
     iterator.fixAxisByValue<2>(axis3[fixed_index]);
08be912
     auto const_iterator = const_grid.begin();
08be912
     const_iterator.fixAxisByValue<2>(axis3[fixed_index]);
08be912
-    
08be912
+
08be912
     // Then
08be912
     for (size_t coord4 = 0; coord4 < axis4.size(); ++coord4) {
08be912
       for (size_t coord2 = 0; coord2 < axis2.size(); ++coord2) {
08be912
@@ -680,17 +683,17 @@ BOOST_FIXTURE_TEST_CASE(fixIteratorByValue, GridContainer_Fixture) {
08be912
         }
08be912
       }
08be912
     }
08be912
-    
08be912
+
08be912
   }
08be912
-  
08be912
+
08be912
   for (size_t fixed_index=0; fixed_index
08be912
-    
08be912
+
08be912
     // When
08be912
     auto iterator = grid.begin();
08be912
     iterator.fixAxisByValue<3>(axis4[fixed_index]);
08be912
     auto const_iterator = const_grid.begin();
08be912
     const_iterator.fixAxisByValue<3>(axis4[fixed_index]);
08be912
-    
08be912
+
08be912
     // Then
08be912
     for (size_t coord3 = 0; coord3 < axis3.size(); ++coord3) {
08be912
       for (size_t coord2 = 0; coord2 < axis2.size(); ++coord2) {
08be912
@@ -714,25 +717,25 @@ BOOST_FIXTURE_TEST_CASE(fixIteratorByValue, GridContainer_Fixture) {
08be912
         }
08be912
       }
08be912
     }
08be912
-    
08be912
+
08be912
   }
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test fixing iterator value not found exception
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(fixIteratorByValueNotFound, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   const GridContainerType& const_grid = grid;
08be912
-  
08be912
+
08be912
   // When
08be912
   auto iterator = grid.begin();
08be912
   auto const_iterator = const_grid.begin();
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_THROW(iterator.fixAxisByValue<0>(axis1.size()+1), Elements::Exception);
08be912
   BOOST_CHECK_THROW(iterator.fixAxisByValue<1>(axis2.size()+1), Elements::Exception);
08be912
@@ -742,25 +745,25 @@ BOOST_FIXTURE_TEST_CASE(fixIteratorByValueNotFound, GridContainer_Fixture) {
08be912
   BOOST_CHECK_THROW(const_iterator.fixAxisByValue<1>(axis2.size()+1), Elements::Exception);
08be912
   BOOST_CHECK_THROW(const_iterator.fixAxisByValue<2>(axis3.size()+1), Elements::Exception);
08be912
   BOOST_CHECK_THROW(const_iterator.fixAxisByValue<3>(axis4.size()+1), Elements::Exception);
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test fixing iterator by value twice for same axis throws exception
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(fixIteratorByValueTwiceForSameAxis, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   const GridContainerType& const_grid = grid;
08be912
-  
08be912
+
08be912
   // When
08be912
   auto iterator = grid.begin().fixAxisByValue<0>(1).fixAxisByValue<1>(1)
08be912
                               .fixAxisByValue<2>(1).fixAxisByValue<3>(1);
08be912
   auto const_iterator = const_grid.begin().fixAxisByValue<0>(1).fixAxisByValue<1>(1)
08be912
                                           .fixAxisByValue<2>(1).fixAxisByValue<3>(1);
08be912
-  
08be912
+
08be912
   // Then
08be912
   iterator.fixAxisByValue<0>(1);
08be912
   iterator.fixAxisByValue<1>(1);
08be912
@@ -770,43 +773,43 @@ BOOST_FIXTURE_TEST_CASE(fixIteratorByValueTwiceForSameAxis, GridContainer_Fixtur
08be912
   const_iterator.fixAxisByValue<1>(1);
08be912
   BOOST_CHECK_THROW(const_iterator.fixAxisByValue<2>(2), Elements::Exception);
08be912
   BOOST_CHECK_THROW(const_iterator.fixAxisByValue<3>(2), Elements::Exception);
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test fixing all exes of iterator by other iterator
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(fixIteratorAllAxes, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid1 {axes_tuple};
08be912
   auto iter1 = grid1.begin();
08be912
   GridContainerType grid2 {axes_tuple};
08be912
   auto iter2 = grid2.begin();
08be912
-  
08be912
+
08be912
   // When
08be912
   iter1.fixAxisByIndex<0>(3).fixAxisByIndex<1>(2).fixAxisByIndex<2>(1).fixAxisByIndex<3>(0);
08be912
   iter2.fixAllAxes(iter1);
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_EQUAL(iter2.axisIndex<0>(), 3u);
08be912
   BOOST_CHECK_EQUAL(iter2.axisIndex<1>(), 2u);
08be912
   BOOST_CHECK_EQUAL(iter2.axisIndex<2>(), 1u);
08be912
   BOOST_CHECK_EQUAL(iter2.axisIndex<3>(), 0u);
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test slicing using index out of bound exception
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(sliceByIndexOutOfBound, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   const GridContainerType& const_grid = grid;
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_THROW(grid.fixAxisByIndex<0>(axis1.size()), Elements::Exception);
08be912
   BOOST_CHECK_THROW(grid.fixAxisByIndex<1>(axis2.size()), Elements::Exception);
08be912
@@ -816,19 +819,19 @@ BOOST_FIXTURE_TEST_CASE(sliceByIndexOutOfBound, GridContainer_Fixture) {
08be912
   BOOST_CHECK_THROW(const_grid.fixAxisByIndex<1>(axis2.size()), Elements::Exception);
08be912
   BOOST_CHECK_THROW(const_grid.fixAxisByIndex<2>(axis3.size()), Elements::Exception);
08be912
   BOOST_CHECK_THROW(const_grid.fixAxisByIndex<3>(axis4.size()), Elements::Exception);
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test slicing using index twice at the same axis throws exception
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(sliceByIndexTwiceSameAxis, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   const GridContainerType& const_grid = grid;
08be912
-  
08be912
+
08be912
   // When
08be912
   auto slice0 = grid.fixAxisByIndex<0>(0);
08be912
   auto slice1 = grid.fixAxisByIndex<1>(0);
08be912
@@ -838,7 +841,7 @@ BOOST_FIXTURE_TEST_CASE(sliceByIndexTwiceSameAxis, GridContainer_Fixture) {
08be912
   auto& const_slice1 = const_grid.fixAxisByIndex<1>(0);
08be912
   auto& const_slice2 = const_grid.fixAxisByIndex<2>(0);
08be912
   auto& const_slice3 = const_grid.fixAxisByIndex<3>(0);
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_THROW(slice0.fixAxisByIndex<0>(0), Elements::Exception);
08be912
   BOOST_CHECK_THROW(slice1.fixAxisByIndex<1>(0), Elements::Exception);
08be912
@@ -848,19 +851,19 @@ BOOST_FIXTURE_TEST_CASE(sliceByIndexTwiceSameAxis, GridContainer_Fixture) {
08be912
   BOOST_CHECK_THROW(const_slice1.fixAxisByIndex<1>(0), Elements::Exception);
08be912
   BOOST_CHECK_THROW(const_slice2.fixAxisByIndex<2>(1), Elements::Exception);
08be912
   BOOST_CHECK_THROW(const_slice3.fixAxisByIndex<3>(1), Elements::Exception);
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test slicing using value not found exception
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(sliceByValueNotFound, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   const GridContainerType& const_grid = grid;
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_THROW(grid.fixAxisByValue<0>(axis1.size()+1), Elements::Exception);
08be912
   BOOST_CHECK_THROW(grid.fixAxisByValue<1>(axis2.size()+1), Elements::Exception);
08be912
@@ -870,19 +873,19 @@ BOOST_FIXTURE_TEST_CASE(sliceByValueNotFound, GridContainer_Fixture) {
08be912
   BOOST_CHECK_THROW(const_grid.fixAxisByValue<1>(axis2.size()+1), Elements::Exception);
08be912
   BOOST_CHECK_THROW(const_grid.fixAxisByValue<2>(axis3.size()+1), Elements::Exception);
08be912
   BOOST_CHECK_THROW(const_grid.fixAxisByValue<3>(axis4.size()+1), Elements::Exception);
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test slicing using value twice at the same axis throws exception
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(sliceByValueTwiceSameAxis, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   const GridContainerType& const_grid = grid;
08be912
-  
08be912
+
08be912
   // When
08be912
   auto slice0 = grid.fixAxisByValue<0>(1);
08be912
   auto slice1 = grid.fixAxisByValue<1>(1);
08be912
@@ -892,7 +895,7 @@ BOOST_FIXTURE_TEST_CASE(sliceByValueTwiceSameAxis, GridContainer_Fixture) {
08be912
   auto& const_slice1 = const_grid.fixAxisByValue<1>(1);
08be912
   auto& const_slice2 = const_grid.fixAxisByValue<2>(1);
08be912
   auto& const_slice3 = const_grid.fixAxisByValue<3>(1);
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_THROW(slice0.fixAxisByValue<0>(1), Elements::Exception);
08be912
   BOOST_CHECK_THROW(slice1.fixAxisByValue<1>(1), Elements::Exception);
08be912
@@ -902,46 +905,46 @@ BOOST_FIXTURE_TEST_CASE(sliceByValueTwiceSameAxis, GridContainer_Fixture) {
08be912
   BOOST_CHECK_THROW(const_slice1.fixAxisByValue<1>(1), Elements::Exception);
08be912
   BOOST_CHECK_THROW(const_slice2.fixAxisByValue<2>(2), Elements::Exception);
08be912
   BOOST_CHECK_THROW(const_slice3.fixAxisByValue<3>(2), Elements::Exception);
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test that modifications to the slices are reflected to the original
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(sliceChancesReflected, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   auto slice_index = grid.fixAxisByIndex<0>(2).fixAxisByIndex<1>(2).fixAxisByIndex<2>(2).fixAxisByIndex<3>(1);
08be912
   auto slice_value = grid.fixAxisByValue<0>(2).fixAxisByValue<1>(2).fixAxisByValue<2>(2).fixAxisByValue<3>(1);
08be912
-  
08be912
+
08be912
   // When
08be912
   *slice_index.begin() = -10;
08be912
   *slice_value.begin() = -20;
08be912
-  
08be912
-  
08be912
+
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_EQUAL(grid(2, 2, 2, 1), -10);
08be912
   BOOST_CHECK_EQUAL(grid(1, 1, 1, 0), -20);
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test that slices have correct axes and size
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(sliceAxes, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   const GridContainerType& const_grid = grid;
08be912
   std::vector<int> expected_fixed_axis = {2};
08be912
-  
08be912
+
08be912
   // When
08be912
   auto slice = grid.fixAxisByIndex<1>(1);
08be912
   auto& const_slice = const_grid.fixAxisByIndex<1>(1);
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_EQUAL(slice.size(), grid.size() / axis2.size());
08be912
   BOOST_CHECK_EQUAL(slice.getAxis<0>().name(), axis1.name());
08be912
@@ -963,19 +966,19 @@ BOOST_FIXTURE_TEST_CASE(sliceAxes, GridContainer_Fixture) {
08be912
   BOOST_CHECK_EQUAL_COLLECTIONS(const_slice.getAxis<2>().begin(), const_slice.getAxis<2>().end(), axis3.begin(), axis3.end());
08be912
   BOOST_CHECK_EQUAL(const_slice.getAxis<3>().name(), axis4.name());
08be912
   BOOST_CHECK_EQUAL_COLLECTIONS(const_slice.getAxis<3>().begin(), const_slice.getAxis<3>().end(), axis4.begin(), axis4.end());
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test that slices iterator works fine
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(sliceIterator, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   const GridContainerType& const_grid = grid;
08be912
-  
08be912
+
08be912
   // When
08be912
   auto slice = grid.fixAxisByIndex<1>(1).fixAxisByIndex<3>(0);
08be912
   auto slice_iter = slice.begin();
08be912
@@ -983,7 +986,7 @@ BOOST_FIXTURE_TEST_CASE(sliceIterator, GridContainer_Fixture) {
08be912
   auto& const_slice = const_grid.fixAxisByIndex<1>(1).fixAxisByIndex<3>(0);
08be912
   auto const_slice_iter = const_slice.begin();
08be912
   auto const_grid_iter = const_grid.begin().fixAxisByIndex<1>(1).fixAxisByIndex<3>(0);
08be912
-  
08be912
+
08be912
   // Then
08be912
   for (; slice_iter!=slice.end(); ++slice_iter, ++grid_iter) {
08be912
     BOOST_CHECK_EQUAL(*slice_iter, *grid_iter);
08be912
@@ -1001,15 +1004,15 @@ BOOST_FIXTURE_TEST_CASE(sliceIterator, GridContainer_Fixture) {
08be912
     BOOST_CHECK_EQUAL(const_slice_iter.axisValue<3>(), const_grid_iter.axisValue<3>());
08be912
   }
08be912
   BOOST_CHECK(const_grid_iter == const_grid.end());
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test that slices parenthesis operator works fine
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(sliceParenthesisOperator, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   double custom_value = 0;
08be912
@@ -1017,10 +1020,10 @@ BOOST_FIXTURE_TEST_CASE(sliceParenthesisOperator, GridContainer_Fixture) {
08be912
     custom_value += 0.1;
08be912
     cell = custom_value;
08be912
   }
08be912
-  
08be912
+
08be912
   // When
08be912
   auto slice = grid.fixAxisByIndex<1>(2).fixAxisByIndex<3>(1);
08be912
-  
08be912
+
08be912
   // Then
08be912
   for (size_t coord1=0; coord1
08be912
     for (size_t coord3=0; coord3
08be912
@@ -1032,9 +1035,9 @@ BOOST_FIXTURE_TEST_CASE(sliceParenthesisOperator, GridContainer_Fixture) {
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test that slices at works fine
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(sliceAtOperator, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
   double custom_value = 0;
08be912
@@ -1042,38 +1045,38 @@ BOOST_FIXTURE_TEST_CASE(sliceAtOperator, GridContainer_Fixture) {
08be912
     custom_value += 0.1;
08be912
     cell = custom_value;
08be912
   }
08be912
-  
08be912
+
08be912
   // When
08be912
   auto slice = grid.fixAxisByIndex<1>(2).fixAxisByIndex<3>(1);
08be912
-  
08be912
+
08be912
   // Then
08be912
   for (size_t coord1=0; coord1
08be912
     for (size_t coord3=0; coord3
08be912
       BOOST_CHECK_EQUAL(slice.at(coord1, 0, coord3, 0), grid(coord1, 2, coord3, 1));
08be912
     }
08be912
   }
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
 // Test that slices fixed axes throw exception for non zero indices when at is used
08be912
 //-----------------------------------------------------------------------------
08be912
-    
08be912
+
08be912
 BOOST_FIXTURE_TEST_CASE(sliceFixAxisNonZeroIndexAccess, GridContainer_Fixture) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   GridContainerType grid {axes_tuple};
08be912
-  
08be912
+
08be912
   // When
08be912
   auto slice = grid.fixAxisByIndex<0>(0).fixAxisByIndex<1>(2).fixAxisByIndex<2>(2).fixAxisByIndex<3>(1);
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_EQUAL(slice.at(0, 0, 0, 0), 0.);
08be912
   BOOST_CHECK_THROW(slice.at(1, 0, 0, 0), Elements::Exception);
08be912
   BOOST_CHECK_THROW(slice.at(0, 1, 0, 0), Elements::Exception);
08be912
   BOOST_CHECK_THROW(slice.at(0, 0, 1, 0), Elements::Exception);
08be912
   BOOST_CHECK_THROW(slice.at(0, 0, 0, 1), Elements::Exception);
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
diff --git a/MathUtils/tests/src/interpolation/Spline_test.cpp b/MathUtils/tests/src/interpolation/Spline_test.cpp
08ee21d
index 76502bc..7d0b5bd 100644
08be912
--- a/MathUtils/tests/src/interpolation/Spline_test.cpp
08be912
+++ b/MathUtils/tests/src/interpolation/Spline_test.cpp
08be912
@@ -23,7 +23,6 @@
08be912
 */
08be912
 
08be912
 #include <boost/test/unit_test.hpp>
08be912
-#include <boost/test/floating_point_comparison.hpp>
08be912
 #include <cmath>
08be912
 #include "MathUtils/interpolation/interpolation.h"
08be912
 #include "MathUtils/function/Piecewise.h"
08be912
@@ -33,8 +32,9 @@ using namespace Euclid::MathUtils;
08be912
 
08be912
 
08be912
 struct Spline_Fixture {
08be912
-  double close_tolerance{1.2E-2};
08be912
-  double small_tolerance{1E-12};
08be912
+  const double eps = std::sqrt(std::numeric_limits<double>::epsilon());
08be912
+  const double close_tolerance{1.2E-2};
08be912
+  const double small_tolerance{1E-12};
08be912
 
08be912
   std::vector<double> x, y;
08be912
 
08be912
@@ -66,7 +66,13 @@ BOOST_FIXTURE_TEST_CASE(fx, Spline_Fixture) {
08be912
 
08be912
   // Then
08be912
   for (size_t i = 0; i < y.size(); i++) {
08be912
-    BOOST_CHECK_CLOSE(result[i], y[i], close_tolerance);
08be912
+    if (std::abs(result[i]) <= eps) {
08be912
+        BOOST_CHECK_SMALL(result[i], small_tolerance);
08be912
+        BOOST_CHECK_SMALL(y[i], small_tolerance);
08be912
+    }
08be912
+    else {
08be912
+        BOOST_CHECK_CLOSE(result[i], y[i], close_tolerance);
08be912
+    }
08be912
   }
08be912
   BOOST_CHECK_SMALL(outside1, small_tolerance);
08be912
   BOOST_CHECK_SMALL(outside2, small_tolerance);
08be912
@@ -85,8 +91,18 @@ BOOST_FIXTURE_TEST_CASE(Spline_fx, Spline_Fixture) {
08be912
     auto x0 = x[i + 1];
08be912
     auto& left = splines[i];
08be912
     auto& right = splines[i + 1];
08be912
-    BOOST_CHECK_CLOSE((*left)(x0), (*right)(x0), close_tolerance);
08be912
-    BOOST_CHECK_CLOSE((*left)(x0), y[i + 1], close_tolerance);
08be912
+    auto left_val = (*left)(x0);
08be912
+    auto right_val = (*right)(x0);
08be912
+
08be912
+    if (std::abs(left_val) <= eps || std::abs(right_val) <= eps) {
08be912
+        BOOST_CHECK_SMALL(left_val, small_tolerance);
08be912
+        BOOST_CHECK_SMALL(right_val, small_tolerance);
08be912
+        BOOST_CHECK_SMALL(y[i + 1], small_tolerance);
08be912
+    }
08be912
+    else {
08be912
+        BOOST_CHECK_CLOSE(left_val, right_val, close_tolerance);
08be912
+        BOOST_CHECK_CLOSE(left_val, y[i + 1], close_tolerance);
08be912
+    }
08be912
   }
08be912
 }
08be912
 
08be912
@@ -106,7 +122,13 @@ BOOST_FIXTURE_TEST_CASE(Spline_dfx, Spline_Fixture) {
08be912
     auto left_dy = derivative(*left, x0);
08be912
     auto right_dy = derivative(*right, x0);
08be912
 
08be912
-    BOOST_CHECK_CLOSE(left_dy, right_dy, close_tolerance);
08be912
+    if (std::abs(left_dy) <= eps || std::abs(right_dy) <= eps) {
08be912
+      BOOST_CHECK_SMALL(left_dy, small_tolerance);
08be912
+      BOOST_CHECK_SMALL(right_dy, small_tolerance);
08be912
+    }
08be912
+    else {
08be912
+      BOOST_CHECK_CLOSE(left_dy, right_dy, close_tolerance);
08be912
+    }
08be912
   }
08be912
 }
08be912
 
08be912
@@ -115,8 +137,6 @@ BOOST_FIXTURE_TEST_CASE(Spline_dfx, Spline_Fixture) {
08be912
 // also the second derivative of the splines to each side must match
08be912
 //-----------------------------------------------------------------------------
08be912
 BOOST_FIXTURE_TEST_CASE(Spline_ddfx, Spline_Fixture) {
08be912
-  const double eps = std::numeric_limits<double>::epsilon();
08be912
-
08be912
   auto cubic_f = interpolate(x, y, InterpolationType::CUBIC_SPLINE);
08be912
   auto cubic_pieces = dynamic_cast<Piecewise *>(cubic_f.get());
08be912
   auto& splines = cubic_pieces->getFunctions();
08ee21d
@@ -153,8 +173,8 @@ BOOST_FIXTURE_TEST_CASE(Spline_ddfx_endpoint, Spline_Fixture) {
08ee21d
   auto left_ddy = derivative2nd(*left, x.front());
08ee21d
   auto right_ddy = derivative2nd(*right, x.back());
08ee21d
 
08ee21d
-  BOOST_CHECK_SMALL(left_ddy, 1e-5);
08ee21d
-  BOOST_CHECK_SMALL(right_ddy, 1e-5);
08ee21d
+  BOOST_CHECK_SMALL(left_ddy, 1e-4);
08ee21d
+  BOOST_CHECK_SMALL(right_ddy, 1e-4);
08ee21d
 }
08ee21d
 
08ee21d
 //-----------------------------------------------------------------------------
08ee21d
@@ -166,8 +186,8 @@ BOOST_FIXTURE_TEST_CASE(Spline_extrapolation, Spline_Fixture) {
08ee21d
   auto left_ddy = derivative2nd(*cubic_f, x.front());
08ee21d
   auto right_ddy = derivative2nd(*cubic_f, x.back());
08ee21d
 
08ee21d
-  BOOST_CHECK_SMALL(left_ddy, 1e-5);
08ee21d
-  BOOST_CHECK_SMALL(right_ddy, 1e-5);
08ee21d
+  BOOST_CHECK_SMALL(left_ddy, 1e-4);
08ee21d
+  BOOST_CHECK_SMALL(right_ddy, 1e-4);
08ee21d
 }
08ee21d
 
08ee21d
 //-----------------------------------------------------------------------------
08be912
diff --git a/Table/Table/CastVisitor.h b/Table/Table/CastVisitor.h
08be912
index 92f1c01..72557cb 100644
08be912
--- a/Table/Table/CastVisitor.h
08be912
+++ b/Table/Table/CastVisitor.h
08be912
@@ -1,20 +1,20 @@
08be912
-/*  
08be912
- * Copyright (C) 2012-2020 Euclid Science Ground Segment    
08be912
- *  
08be912
+/*
08be912
+ * Copyright (C) 2012-2020 Euclid Science Ground Segment
08be912
+ *
08be912
  * This library is free software; you can redistribute it and/or modify it under
08be912
- * the terms of the GNU Lesser General Public License as published by the Free 
08be912
- * Software Foundation; either version 3.0 of the License, or (at your option)  
08be912
- * any later version.  
08be912
- *  
08be912
- * This library is distributed in the hope that it will be useful, but WITHOUT 
08be912
+ * the terms of the GNU Lesser General Public License as published by the Free
08be912
+ * Software Foundation; either version 3.0 of the License, or (at your option)
08be912
+ * any later version.
08be912
+ *
08be912
+ * This library is distributed in the hope that it will be useful, but WITHOUT
08be912
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
08be912
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more  
08be912
- * details.  
08be912
- *  
08be912
- * You should have received a copy of the GNU Lesser General Public License 
08be912
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
08be912
+ * details.
08be912
+ *
08be912
+ * You should have received a copy of the GNU Lesser General Public License
08be912
  * along with this library; if not, write to the Free Software Foundation, Inc.,
08be912
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA  
08be912
- */  
08be912
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
08be912
+ */
08be912
 
08be912
 /**
08be912
  * @file Table/CastVisitor.h
08be912
@@ -39,27 +39,27 @@ namespace Table {
08be912
 
08be912
 template <typename To>
08be912
 class CastVisitor : public boost::static_visitor<To> {
08be912
-  
08be912
+
08be912
 public:
08be912
-  
08be912
+
08be912
   template <typename From>
08be912
   To operator() (const From& from, typename std::enable_if<std::is_same<From, To>::value>::type* = 0) const {
08be912
     return from;
08be912
   }
08be912
-  
08be912
+
08be912
   template <typename From>
08be912
   To operator() (const From&, typename std::enable_if::value>::type* = 0) const {
08be912
     throw Elements::Exception() << "CastVisitor cannot convert "
08be912
             << typeid(From).name() << " type to " << typeid(To).name();
08be912
   }
08be912
-  
08be912
+
08be912
 };
08be912
 
08be912
 template <>
08be912
 class CastVisitor<std::string> : public boost::static_visitor<std::string> {
08be912
-  
08be912
+
08be912
 public:
08be912
-  
08be912
+
08be912
   template <typename From>
08be912
   std::string operator() (const From& from) const {
08be912
     std::stringstream result {};
08be912
@@ -71,25 +71,25 @@ public:
08be912
 
08be912
 template <>
08be912
 class CastVisitor<double> : public boost::static_visitor<double> {
08be912
-  
08be912
+
08be912
   template <typename From>
08be912
   static constexpr bool generic() {
08be912
     return std::is_arithmetic<From>::value;
08be912
   }
08be912
-  
08be912
+
08be912
 public:
08be912
-  
08be912
+
08be912
   template <typename From>
08be912
   double operator() (const From& , typename std::enable_if()>::type* = 0) const {
08be912
     throw Elements::Exception() << "CastVisitor cannot convert "
08be912
             << typeid(From).name() << " type to " << typeid(double).name();
08be912
   }
08be912
-  
08be912
+
08be912
   template <typename From>
08be912
   double operator() (const From& from, typename std::enable_if<generic<From>()>::type* = 0) const {
08be912
     return from;
08be912
   }
08be912
-  
08be912
+
08be912
   double operator() (const std::string& from) const {
08be912
     char *endptr = nullptr;
08be912
     double value = std::strtod(from.c_str(), &endptr);
08be912
@@ -108,26 +108,26 @@ public:
08be912
 
08be912
 template <>
08be912
 class CastVisitor<float> : public boost::static_visitor<float> {
08be912
-  
08be912
+
08be912
   template <typename From>
08be912
   static constexpr bool generic() {
08be912
     return std::is_arithmetic<From>::value &&
08be912
            !std::is_same<From, double>::value;
08be912
   }
08be912
-  
08be912
+
08be912
 public:
08be912
-  
08be912
+
08be912
   template <typename From>
08be912
   double operator() (const From& , typename std::enable_if()>::type* = 0) const {
08be912
     throw Elements::Exception() << "CastVisitor cannot convert "
08be912
             << typeid(From).name() << " type to " << typeid(float).name();
08be912
   }
08be912
-  
08be912
+
08be912
   template <typename From>
08be912
   float operator() (const From& from, typename std::enable_if<generic<From>()>::type* = 0) const {
08be912
     return from;
08be912
   }
08be912
-  
08be912
+
08be912
   float operator() (const std::string& from) const {
08be912
     char *endptr = nullptr;
08be912
     float value = std::strtof(from.c_str(), &endptr);
08be912
@@ -146,28 +146,28 @@ public:
08be912
 
08be912
 template <>
08be912
 class CastVisitor<int64_t> : public boost::static_visitor<int64_t> {
08be912
-  
08be912
+
08be912
   template <typename From>
08be912
   static constexpr bool generic() {
08be912
     return std::is_integral<From>::value;
08be912
   }
08be912
-  
08be912
+
08be912
 public:
08be912
-  
08be912
+
08be912
   template <typename From>
08be912
   double operator() (const From& , typename std::enable_if()>::type* = 0) const {
08be912
     throw Elements::Exception() << "CastVisitor cannot convert "
08be912
             << typeid(From).name() << " type to " << typeid(int64_t).name();
08be912
   }
08be912
-  
08be912
+
08be912
   template <typename From>
08be912
   int64_t operator() (const From& from, typename std::enable_if<generic<From>()>::type* = 0) const {
08be912
     return from;
08be912
   }
08be912
-  
08be912
+
08be912
   int64_t operator() (const std::string& from) const {
08be912
     char *endptr = nullptr;
08be912
-    int64_t value = std::strtol(from.c_str(), &endptr, 10);
08be912
+    int64_t value = std::strtoll(from.c_str(), &endptr, 10);
08be912
     if (endptr == from.c_str()) {
08be912
       throw Elements::Exception() << "CastVisitor cannot convert the string '"
08be912
             << from << "' to " << typeid(int64_t).name();
08be912
@@ -179,29 +179,29 @@ public:
08be912
 
08be912
 template <>
08be912
 class CastVisitor<int32_t> : public boost::static_visitor<int32_t> {
08be912
-  
08be912
+
08be912
   template <typename From>
08be912
   static constexpr bool generic() {
08be912
     return std::is_integral<From>::value &&
08be912
             !std::is_same<From, int64_t>::value;
08be912
   }
08be912
-  
08be912
+
08be912
 public:
08be912
-  
08be912
+
08be912
   template <typename From>
08be912
   double operator() (const From& , typename std::enable_if()>::type* = 0) const {
08be912
     throw Elements::Exception() << "CastVisitor cannot convert "
08be912
             << typeid(From).name() << " type to " << typeid(int32_t).name();
08be912
   }
08be912
-  
08be912
+
08be912
   template <typename From>
08be912
   int32_t operator() (const From& from, typename std::enable_if<generic<From>()>::type* = 0) const {
08be912
     return from;
08be912
   }
08be912
-  
08be912
+
08be912
   int32_t operator() (const std::string& from) const {
08be912
     char *endptr = nullptr;
08be912
-    int64_t value = std::strtol(from.c_str(), &endptr, 10);
08be912
+    int64_t value = std::strtoll(from.c_str(), &endptr, 10);
08be912
     if (endptr == from.c_str()) {
08be912
       throw Elements::Exception() << "CastVisitor cannot convert the string '"
08be912
                                   << from << "' to " << typeid(int32_t).name();
08be912
@@ -217,16 +217,16 @@ public:
08be912
 
08be912
 template <typename VectorType>
08be912
 class CastVisitor<std::vector<VectorType>> : public boost::static_visitor<std::vector<VectorType>> {
08be912
-  
08be912
+
08be912
 public:
08be912
-  
08be912
+
08be912
   template <typename From>
08be912
   std::vector<VectorType> operator() (const From& from) const {
08be912
     std::vector<VectorType> result {};
08be912
     result.push_back(CastVisitor<VectorType>{}(from));
08be912
     return result;
08be912
   }
08be912
-  
08be912
+
08be912
   template <typename From>
08be912
   std::vector<VectorType> operator() (const std::vector<From>& from) const {
08be912
     std::vector<VectorType> result {};
08be912
@@ -235,7 +235,7 @@ public:
08be912
     }
08be912
     return result;
08be912
   }
08be912
-  
08be912
+
08be912
   std::vector<VectorType> operator() (const std::string& from) const {
08be912
     std::vector<VectorType> result {};
08be912
     boost::char_separator<char> sep {","};
08be912
@@ -245,12 +245,12 @@ public:
08be912
     }
08be912
     return result;
08be912
   }
08be912
-    
08be912
+
08be912
   // If the types match exactly we avoid an expensive copying
08be912
   const std::vector<VectorType>& operator() (const std::vector<VectorType>& from) const {
08be912
     return from;
08be912
   }
08be912
-  
08be912
+
08be912
 };
08be912
 
08be912
 } /* namespace Table */
08be912
diff --git a/XYDataset/src/lib/QualifiedName.cpp b/XYDataset/src/lib/QualifiedName.cpp
08be912
index 7d584be..4541f6a 100644
08be912
--- a/XYDataset/src/lib/QualifiedName.cpp
08be912
+++ b/XYDataset/src/lib/QualifiedName.cpp
08be912
@@ -1,22 +1,22 @@
08be912
 /*
08be912
- * Copyright (C) 2012-2020 Euclid Science Ground Segment    
08be912
- *  
08be912
+ * Copyright (C) 2012-2020 Euclid Science Ground Segment
08be912
+ *
08be912
  * This library is free software; you can redistribute it and/or modify it under
08be912
- * the terms of the GNU Lesser General Public License as published by the Free 
08be912
- * Software Foundation; either version 3.0 of the License, or (at your option)  
08be912
- * any later version.  
08be912
- *  
08be912
- * This library is distributed in the hope that it will be useful, but WITHOUT 
08be912
+ * the terms of the GNU Lesser General Public License as published by the Free
08be912
+ * Software Foundation; either version 3.0 of the License, or (at your option)
08be912
+ * any later version.
08be912
+ *
08be912
+ * This library is distributed in the hope that it will be useful, but WITHOUT
08be912
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
08be912
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more  
08be912
- * details.  
08be912
- *  
08be912
- * You should have received a copy of the GNU Lesser General Public License 
08be912
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
08be912
+ * details.
08be912
+ *
08be912
+ * You should have received a copy of the GNU Lesser General Public License
08be912
  * along with this library; if not, write to the Free Software Foundation, Inc.,
08be912
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA  
08be912
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
08be912
  */
08be912
- 
08be912
- /** 
08be912
+
08be912
+ /**
08be912
  * @file src/lib/QualifiedName.cpp
08be912
  * @date May 19, 2014
08be912
  * @author Nikolaos Apostolakos
08be912
@@ -44,7 +44,7 @@ QualifiedName::QualifiedName(std::vector<std::string> groups, std::string name)
08be912
   }
08be912
   m_qualified_name.append(m_dataset_name);
08be912
 }
08be912
-            
08be912
+
08be912
 std::vector<std::string> getGroups(const std::string& qualified_name) {
08be912
   std::vector<std::string> groups {};
08be912
   boost::split(groups, qualified_name, boost::is_any_of("/"));
08be912
@@ -52,7 +52,7 @@ std::vector<std::string> getGroups(const std::string& qualified_name) {
08be912
   groups.pop_back();
08be912
   return groups;
08be912
 }
08be912
-            
08be912
+
08be912
 std::string getName(const std::string& qualified_name) {
08be912
   std::vector<std::string> groups {};
08be912
   boost::split(groups, qualified_name, boost::is_any_of("/"));
08be912
@@ -79,7 +79,7 @@ bool QualifiedName::belongsInGroup(const QualifiedName& group) const {
08be912
     return false;
08be912
   }
08be912
   bool group_check = std::equal(group.m_groups.begin(), group.m_groups.end(), this->m_groups.begin());
08be912
-  return group_check 
08be912
+  return group_check
08be912
         ? group.m_dataset_name == this->m_groups.at(group.m_groups.size())
08be912
         : false;
08be912
 }
08be912
@@ -93,13 +93,7 @@ size_t QualifiedName::hash() const {
08be912
 }
08be912
 
08be912
 bool QualifiedName::operator<(const QualifiedName& other) const {
08be912
-  size_t thisHash = this->hash();
08be912
-  size_t otherHash = other.hash();
08be912
-  if (thisHash != otherHash) {
08be912
-    return thisHash < otherHash;
08be912
-  } else{
08be912
-    return this->qualifiedName() < other.qualifiedName();
08be912
-  }
08be912
+  return this->qualifiedName() < other.qualifiedName();
08be912
 }
08be912
 
08be912
 bool QualifiedName::operator==(const QualifiedName& other) const {
08be912
diff --git a/XYDataset/tests/src/QualifiedName_test.cpp b/XYDataset/tests/src/QualifiedName_test.cpp
08be912
index 82798a1..1d8e9c4 100644
08be912
--- a/XYDataset/tests/src/QualifiedName_test.cpp
08be912
+++ b/XYDataset/tests/src/QualifiedName_test.cpp
08be912
@@ -1,22 +1,22 @@
08be912
 /*
08be912
- * Copyright (C) 2012-2020 Euclid Science Ground Segment    
08be912
- *  
08be912
+ * Copyright (C) 2012-2020 Euclid Science Ground Segment
08be912
+ *
08be912
  * This library is free software; you can redistribute it and/or modify it under
08be912
- * the terms of the GNU Lesser General Public License as published by the Free 
08be912
- * Software Foundation; either version 3.0 of the License, or (at your option)  
08be912
- * any later version.  
08be912
- *  
08be912
- * This library is distributed in the hope that it will be useful, but WITHOUT 
08be912
+ * the terms of the GNU Lesser General Public License as published by the Free
08be912
+ * Software Foundation; either version 3.0 of the License, or (at your option)
08be912
+ * any later version.
08be912
+ *
08be912
+ * This library is distributed in the hope that it will be useful, but WITHOUT
08be912
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
08be912
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more  
08be912
- * details.  
08be912
- *  
08be912
- * You should have received a copy of the GNU Lesser General Public License 
08be912
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
08be912
+ * details.
08be912
+ *
08be912
+ * You should have received a copy of the GNU Lesser General Public License
08be912
  * along with this library; if not, write to the Free Software Foundation, Inc.,
08be912
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA  
08be912
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
08be912
  */
08be912
- 
08be912
- /** 
08be912
+
08be912
+ /**
08be912
  * @file tests/src/QualifiedName_test.cpp
08be912
  * @date May 19, 2014
08be912
  * @author Nikolaos Apostolakos
08be912
@@ -38,12 +38,12 @@ BOOST_AUTO_TEST_SUITE (QualifiedName_test)
08be912
 //-----------------------------------------------------------------------------
08be912
 
08be912
 BOOST_AUTO_TEST_CASE(constructorExceptions_test) {
08be912
-  
08be912
+
08be912
   BOOST_CHECK_THROW((Euclid::XYDataset::QualifiedName{{"","g"}, "b"}),Elements::Exception);
08be912
   BOOST_CHECK_THROW((Euclid::XYDataset::QualifiedName{{"asd/sad", "g"}, "b"}), Elements::Exception);
08be912
   BOOST_CHECK_THROW((Euclid::XYDataset::QualifiedName{{"a","g"}, ""}), Elements::Exception);
08be912
   BOOST_CHECK_THROW((Euclid::XYDataset::QualifiedName{{"a","g"}, "bdf/sdf"}), Elements::Exception);
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
@@ -51,12 +51,12 @@ BOOST_AUTO_TEST_CASE(constructorExceptions_test) {
08be912
 //-----------------------------------------------------------------------------
08be912
 
08be912
 BOOST_AUTO_TEST_CASE(nameMethods_test) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   std::string group1 = "TestGroup1";
08be912
   std::string group2 = "TestGroup2";
08be912
   std::string name = "TestName";
08be912
-  
08be912
+
08be912
   // When
08be912
   Euclid::XYDataset::QualifiedName qualifiedName1 {{group1,group2}, name};
08be912
   auto groups1 = qualifiedName1.groups();
08be912
@@ -64,7 +64,7 @@ BOOST_AUTO_TEST_CASE(nameMethods_test) {
08be912
   auto groups2 = qualifiedName2.groups();
08be912
   Euclid::XYDataset::QualifiedName qualifiedName3 {{}, name};
08be912
   auto groups3 = qualifiedName3.groups();
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_EQUAL(groups1.size(), 2);
08be912
   BOOST_CHECK_EQUAL(groups1[0], group1);
08be912
@@ -78,7 +78,7 @@ BOOST_AUTO_TEST_CASE(nameMethods_test) {
08be912
   BOOST_CHECK_EQUAL(groups3.size(), 0);
08be912
   BOOST_CHECK_EQUAL(qualifiedName3.datasetName(), name);
08be912
   BOOST_CHECK_EQUAL(qualifiedName3.qualifiedName(), name);
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
@@ -86,10 +86,10 @@ BOOST_AUTO_TEST_CASE(nameMethods_test) {
08be912
 //-----------------------------------------------------------------------------
08be912
 
08be912
 BOOST_AUTO_TEST_CASE(belongsInGroup_test) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   Euclid::XYDataset::QualifiedName qualified_name {"group1/group2/group3/name"};
08be912
-  
08be912
+
08be912
   // When
08be912
   Euclid::XYDataset::QualifiedName group1 {"group1"};
08be912
   Euclid::XYDataset::QualifiedName group1_group2 {"group1/group2"};
08be912
@@ -97,7 +97,7 @@ BOOST_AUTO_TEST_CASE(belongsInGroup_test) {
08be912
   Euclid::XYDataset::QualifiedName wrong_group_1 {"wrong_group"};
08be912
   Euclid::XYDataset::QualifiedName wrong_group_2 {"group1group2"};
08be912
   Euclid::XYDataset::QualifiedName wrong_group_3 {"group1/group4/group3"};
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK(qualified_name.belongsInGroup(group1));
08be912
   BOOST_CHECK(qualified_name.belongsInGroup(group1_group2));
08be912
@@ -106,7 +106,7 @@ BOOST_AUTO_TEST_CASE(belongsInGroup_test) {
08be912
   BOOST_CHECK(!qualified_name.belongsInGroup(wrong_group_2));
08be912
   BOOST_CHECK(!qualified_name.belongsInGroup(wrong_group_3));
08be912
   BOOST_CHECK(!qualified_name.belongsInGroup(qualified_name));
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 //-----------------------------------------------------------------------------
08be912
@@ -114,38 +114,38 @@ BOOST_AUTO_TEST_CASE(belongsInGroup_test) {
08be912
 //-----------------------------------------------------------------------------
08be912
 
08be912
 BOOST_AUTO_TEST_CASE(hashMethod_test) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   Euclid::XYDataset::QualifiedName qualifiedName1 {{"group1","group2"}, "name"};
08be912
   Euclid::XYDataset::QualifiedName qualifiedName2 {{"group1","group2"}, "name"};
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_EQUAL(qualifiedName1.hash(), qualifiedName2.hash());
08be912
-  
08be912
+
08be912
   // Given
08be912
   qualifiedName1 = Euclid::XYDataset::QualifiedName {{"group1","group2"}, "name"};
08be912
   qualifiedName2 = Euclid::XYDataset::QualifiedName {{"group1","group2"}, "name2"};
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_NE(qualifiedName1.hash(), qualifiedName2.hash());
08be912
-  
08be912
+
08be912
   // Given
08be912
   qualifiedName1 = Euclid::XYDataset::QualifiedName {{"group1","group2"}, "name"};
08be912
   qualifiedName2 = Euclid::XYDataset::QualifiedName {{"group1","grou2"}, "name"};
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_NE(qualifiedName1.hash(), qualifiedName2.hash());
08be912
-  
08be912
+
08be912
   // Given
08be912
   qualifiedName1 = Euclid::XYDataset::QualifiedName {{"group1","group2"}, "name"};
08be912
   qualifiedName2 = Euclid::XYDataset::QualifiedName {{"group1","group2"}, "name2"};
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_NE(qualifiedName1.hash(), qualifiedName2.hash());
08be912
-  
08be912
+
08be912
   // Given
08be912
   std::hash<Euclid::XYDataset::QualifiedName> stdHashFunction;
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK_EQUAL(qualifiedName1.hash(), stdHashFunction(qualifiedName1));
08be912
 }
08be912
@@ -155,24 +155,24 @@ BOOST_AUTO_TEST_CASE(hashMethod_test) {
08be912
 //-----------------------------------------------------------------------------
08be912
 
08be912
 BOOST_AUTO_TEST_CASE(comparison_test) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   Euclid::XYDataset::QualifiedName qualifiedName1 {{"group1","group2"}, "name"};
08be912
   Euclid::XYDataset::QualifiedName qualifiedName2 {{"group1","group2"}, "name"};
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK(!(qualifiedName1 < qualifiedName2));
08be912
   BOOST_CHECK(!(qualifiedName2 < qualifiedName1));
08be912
-  
08be912
+
08be912
   // Given
08be912
   qualifiedName1 = Euclid::XYDataset::QualifiedName {{"agroup"}, "aname"};
08be912
   qualifiedName2 = Euclid::XYDataset::QualifiedName {{"bgroup"}, "aname"};
08be912
   Euclid::XYDataset::QualifiedName qualifiedName3 {{"bgroup"}, "bname"};
08be912
-  
08be912
+
08be912
   // Then
08be912
-  BOOST_CHECK_EQUAL(qualifiedName1 < qualifiedName2, qualifiedName1.hash() < qualifiedName2.hash());
08be912
-  BOOST_CHECK_EQUAL(qualifiedName2 < qualifiedName3, qualifiedName2.hash() < qualifiedName3.hash());
08be912
-  BOOST_CHECK_EQUAL(qualifiedName1 < qualifiedName3, qualifiedName1.hash() < qualifiedName3.hash());
08be912
+  BOOST_CHECK(qualifiedName1 < qualifiedName2);
08be912
+  BOOST_CHECK(qualifiedName2 < qualifiedName3);
08be912
+  BOOST_CHECK(qualifiedName1 < qualifiedName3);
08be912
 
08be912
 }
08be912
 
08be912
@@ -181,20 +181,20 @@ BOOST_AUTO_TEST_CASE(comparison_test) {
08be912
 //-----------------------------------------------------------------------------
08be912
 
08be912
 BOOST_AUTO_TEST_CASE(equality_test) {
08be912
-  
08be912
-  
08be912
+
08be912
+
08be912
   // Given
08be912
   Euclid::XYDataset::QualifiedName qualifiedName1 {{"group1","group2"}, "name"};
08be912
   Euclid::XYDataset::QualifiedName qualifiedName2 {{"group1","group2"}, "name"};
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK(qualifiedName1 == qualifiedName2);
08be912
-  
08be912
+
08be912
   // Given
08be912
   qualifiedName1 = Euclid::XYDataset::QualifiedName {{"agroup"}, "aname"};
08be912
   qualifiedName2 = Euclid::XYDataset::QualifiedName {{"bgroup"}, "aname"};
08be912
   Euclid::XYDataset::QualifiedName qualifiedName3 {{"bgroup"}, "bname"};
08be912
-  
08be912
+
08be912
   // Then
08be912
   BOOST_CHECK(!(qualifiedName1 == qualifiedName2));
08be912
   BOOST_CHECK(!(qualifiedName2 == qualifiedName3));
08be912
@@ -202,64 +202,34 @@ BOOST_AUTO_TEST_CASE(equality_test) {
08be912
 
08be912
 }
08be912
 
08be912
-//-----------------------------------------------------------------------------
08be912
-// Check the ordering by hash
08be912
-//-----------------------------------------------------------------------------
08be912
-
08be912
-BOOST_AUTO_TEST_CASE(hashOrdering_test) {
08be912
-  
08be912
-  // Given
08be912
-  Euclid::XYDataset::QualifiedName qualifiedName1 {{"SDSS"}, "g"};
08be912
-  Euclid::XYDataset::QualifiedName qualifiedName2 {{"COSMOS"}, "g"};
08be912
-  Euclid::XYDataset::QualifiedName qualifiedName3 {{"COSMOS"}, "z"};
08be912
-  
08be912
-  // When
08be912
-  std::set<Euclid::XYDataset::QualifiedName> filterSet {};
08be912
-  filterSet.insert(qualifiedName1);
08be912
-  filterSet.insert(qualifiedName2);
08be912
-  filterSet.insert(qualifiedName3);
08be912
-  
08be912
-  // Then
08be912
-  BOOST_CHECK(qualifiedName3.hash() < qualifiedName2.hash());
08be912
-  BOOST_CHECK(qualifiedName2.hash() < qualifiedName1.hash());
08be912
-  BOOST_CHECK(qualifiedName3.hash() < qualifiedName1.hash());
08be912
-  auto iterator = filterSet.begin();
08be912
-  BOOST_CHECK((*iterator) == qualifiedName3);
08be912
-  ++iterator;
08be912
-  BOOST_CHECK((*iterator) == qualifiedName2);
08be912
-  ++iterator;
08be912
-  BOOST_CHECK((*iterator) == qualifiedName1);
08be912
-  
08be912
-}
08be912
-
08be912
 //-----------------------------------------------------------------------------
08be912
 // Check the ordering alphabetically
08be912
 //-----------------------------------------------------------------------------
08be912
 
08be912
 BOOST_AUTO_TEST_CASE(alphabeticalOrdering_test) {
08be912
-  
08be912
+
08be912
   // Given
08be912
   Euclid::XYDataset::QualifiedName qualifiedName1 {{"SDSS"}, "g"};
08be912
   Euclid::XYDataset::QualifiedName qualifiedName2 {{"COSMOS"}, "g"};
08be912
   Euclid::XYDataset::QualifiedName qualifiedName3 {{"COSMOS"}, "z"};
08be912
-  
08be912
+
08be912
   // When
08be912
   std::set<Euclid::XYDataset::QualifiedName, Euclid::XYDataset::QualifiedName::AlphabeticalComparator> filterSet {};
08be912
   filterSet.insert(qualifiedName1);
08be912
   filterSet.insert(qualifiedName2);
08be912
   filterSet.insert(qualifiedName3);
08be912
-  
08be912
+
08be912
   // Then
08be912
-  BOOST_CHECK(qualifiedName3.hash() < qualifiedName2.hash());
08be912
-  BOOST_CHECK(qualifiedName2.hash() < qualifiedName1.hash());
08be912
-  BOOST_CHECK(qualifiedName3.hash() < qualifiedName1.hash());
08be912
+  BOOST_CHECK(qualifiedName3.hash() != qualifiedName2.hash());
08be912
+  BOOST_CHECK(qualifiedName2.hash() != qualifiedName1.hash());
08be912
+  BOOST_CHECK(qualifiedName3.hash() != qualifiedName1.hash());
08be912
   auto iterator = filterSet.begin();
08be912
   BOOST_CHECK((*iterator) == qualifiedName2);
08be912
   ++iterator;
08be912
   BOOST_CHECK((*iterator) == qualifiedName3);
08be912
   ++iterator;
08be912
   BOOST_CHECK((*iterator) == qualifiedName1);
08be912
-  
08be912
+
08be912
 }
08be912
 
08be912
 BOOST_AUTO_TEST_SUITE_END ()