57 main_middle = (std::size_t) ceil(contSize / 2.);
72 if(deq_pos ==
fContainer.end())
return nullptr;
90 vector<_deq_iterator>& vit = fMap[pos];
92 std::size_t maxSize = fSortOut.size();
98 for (std::size_t i = 0; i < fSortOut.size(); ++i)
100 vit[i] = fSortOut[i].Insert(pos);
138 G4cout <<
"G4KDMap::PopOutMiddle ( "<< dimension <<
" )" <<
G4endl;
140 if(!fIsSorted)
Sort();
141 G4KDNode_Base* output_node = fSortOut[dimension].PopOutMiddle();
143 if(output_node ==
nullptr)
return nullptr;
149 = fMap.find(output_node);
152 if(fMap_it == fMap.end())
159 std::vector<_deq_iterator>& vit = fMap_it->second;
170 for(std::size_t i = 0; i < fSortOut.size(); ++i)
185 fSortOut[i].Erase(vit[i]);
196 for (
auto & i : fSortOut)
std::deque< G4KDNode_Base * >::iterator _deq_iterator
G4GLOB_DLL std::ostream G4cout
void Insert(G4KDNode_Base *pos)
G4KDNode_Base * PopOutMiddle(std::size_t dimension)
__1DSortOut(std::size_t dimension)
G4KDNode_Base * GetMidle(std::size_t &)
std::deque< G4KDNode_Base * >::iterator Insert(G4KDNode_Base *)
G4KDNode_Base * PopOutMiddle()
void Erase(std::deque< G4KDNode_Base * >::iterator &)
std::deque< G4KDNode_Base * > fContainer
G4bool operator()(G4KDNode_Base *const &lhs, G4KDNode_Base *const &rhs)