114 const std::vector<BinningData>& bData = gbu.
binningData();
119 throw "BinUtility does not support dim > 3";
148 size_t bin1 = mdim > 1 ?
m_binningData[1].searchGlobal(bPosition) : 0;
149 size_t bin2 = mdim > 2 ?
m_binningData[2].searchGlobal(bPosition) : 0;
151 return {{bin0, bin1, bin2}};
179 size_t ba = 0)
const {
184 size_t cbin =
bin(position, ba);
188 neighbourRange.push_back(pbin);
190 neighbourRange.push_back(cbin);
192 neighbourRange.push_back(nbin);
207 size_t ba = 0)
const {
240 if (!(bData.
inside(bPosition))) {
254 std::vector<BinningData>::const_iterator bdIter =
m_binningData.begin();
256 if (!(*bdIter).inside(lposition)) {
272 size_t max(
size_t ba = 0)
const {
303 throw "dimension out of bounds";
313 size_t serializedBin = bin[0];
320 return serializedBin;
328 <<
"- dimensional array:" << std::endl;
329 std::vector<BinningData>::const_iterator bdIter =
m_binningData.begin();
330 for (
size_t ibd = 0; bdIter !=
m_binningData.end(); ++bdIter, ++ibd) {
331 sl <<
"dimension : " << ibd << std::endl;
332 sl <<
" - type : " << size_t((*bdIter).type) << std::endl;
333 sl <<
" - option : " << size_t((*bdIter).option) << std::endl;
334 sl <<
" - value : " << size_t((*bdIter).binvalue) << std::endl;
335 sl <<
" - bins : " << (*bdIter).bins() << std::endl;
336 sl <<
" - min/max : " << (*bdIter).min <<
" / " << (*bdIter).max
339 sl <<
" - step : " << (*bdIter).step << std::endl;
341 sl <<
" - boundaries : | ";
342 std::vector<float>::const_iterator bIter = (*bdIter).boundaries().begin();
343 for (; bIter != (*bdIter).boundaries().end(); ++bIter) {
344 sl << (*bIter) <<
" | ";