42 std::vector<float> binVector;
43 std::map<float, size_t> binMap;
57 size_t binUtil = binUtility.
bin(testPosition, 0);
58 if (binVec != binBin || binVec != binUtil )
59 ATH_MSG_WARNING(
"Searches through binary (" << binBin <<
"), vector (" << binVec <<
") or tutility (" << binUtil <<
") differ.");
63 return StatusCode::SUCCESS;
71 float range = high - low;
79 std::map< float, size_t >::iterator sIter =
map.begin();
80 for (
size_t cs = 0 ; sIter !=
map.end(); ++sIter, ++cs ){
81 vec.push_back((*sIter).first);
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
std::vector< size_t > vec
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
size_t m_numberOfTestsPerSet
size_t searchInVectorWithBoundary(std::vector< float > &array, float value)
A binary search with a map - superior in O(10) searches.
size_t m_numberOfSegments
size_t binarySearchWithBoundary(std::vector< float > &array, float value)
A binary search with underflow/overflow.
void prepareData(std::vector< float > &vec, std::map< float, size_t > &map, float &low, float &high)
preparation of std::vector and std::map for comparison
BinUtilityTest(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
A generic symmetric BinUtility, for fully symmetric binning in terms of binning grid and binning type...
size_t bin(const Amg::Vector3D &position, size_t ba=0) const
Bin from a 3D vector (already in binning frame)
TrkDetDescrUnitTestBase(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
size_t m_numTests
number of tests
Rndm::Numbers * m_flatDist
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.