59 for (
iterator it = begin(); it != end(); it++, np++)
80 while(!end && m_table->nparts_at_gridpoint(m_table->index(ix,iy,iz))==0){
109 return iterator(
this,m_xmax+1,m_ymax+1,m_zmax+1,0);
136 a_idx.first=m_table->
index(ix,iy,iz);
139 return m_table->
ptr(a_idx);
149 a_idx.first=m_table->
index(ix,iy,iz);
152 return m_table->
ref(a_idx);
158 template <
typename T>
173 template <
typename T>
192 template <
typename T>
193 ostream& operator<<(ostream& ost,const NTBlock<T>& NTB)
195 ost <<
"---NTBlock---"<< endl;
196 ost <<
"range: " << endl;
197 ost <<
"x: " << NTB.m_xmin <<
"-" << NTB.m_xmax << endl;
198 ost <<
"y: " << NTB.m_ymin <<
"-" << NTB.m_ymax << endl;
199 ost <<
"z: " << NTB.m_zmin <<
"-" << NTB.m_zmax << endl;
200 ost <<
"indices:" << endl;
201 for (
int ix=NTB.m_xmin;ix<=NTB.m_xmax;ix++){
202 for (
int iy=NTB.m_ymin;iy<=NTB.m_ymax;iy++){
203 for (
int iz=NTB.m_zmin;iz<=NTB.m_zmax;iz++){
204 ost << NTB.m_table->index(ix,iy,iz) <<
" ";
bool operator==(const NTBlock< T > &b1, const NTBlock< T > &b2)
Definition: nt_block.hpp:159
int m_ymax
Definition: nt_block.h:41
int m_xmax
Definition: nt_block.h:41
pair< int, int > indextype
Definition: ntable.h:72
iterator begin()
Definition: nt_block.hpp:73
representation of a slab of the search array of a NeigborTable
Definition: nt_block.h:22
int index(const Vec3 &)
Definition: ntable.hpp:109
unsigned int size()
Definition: nt_block.hpp:56
T * ptr(NeighborTable< T >::indextype)
Definition: ntable.hpp:216
iterator end()
Definition: nt_block.hpp:107
bool operator!=(const NTBlock< T > &b1, const NTBlock< T > &b2)
Definition: nt_block.hpp:174
int m_xmin
Definition: nt_block.h:41
NeighborTable< T > * m_table
Definition: nt_block.h:40
T * ptr(int, int, int, int)
Definition: nt_block.hpp:133
#define NULL
Definition: t_list.h:17
class for neighbor search
Definition: ntable.h:67
int m_zmax
Definition: nt_block.h:41
iterator for a NTBlock
Definition: ntb_iter.h:33
T & ref(int, int, int, int)
Definition: nt_block.hpp:146
int m_zmin
Definition: nt_block.h:41
T & ref(NeighborTable< T >::indextype)
Definition: ntable.hpp:225
NTBlock()
Definition: nt_block.hpp:17
int m_ymin
Definition: nt_block.h:41