aimstil  5.0.5
til::Neighborhood Class Reference

#include <til/Neighborhood.h>

Public Types

typedef Neighborhood Self
 

Public Member Functions

 Neighborhood ()
 No neighbors. More...
 
 Neighborhood (const Neighborhood &nh)
 Copy constructor. More...
 
 Neighborhood (const bool array[3 *3 *3])
 from C array More...
 
 Neighborhood (bool n000, bool n001, bool n002, bool n010, bool n011, bool n012, bool n020, bool n021, bool n022, bool n100, bool n101, bool n102, bool n110, bool n111, bool n112, bool n120, bool n121, bool n122, bool n200, bool n201, bool n202, bool n210, bool n211, bool n212, bool n220, bool n221, bool n222)
 manual More...
 
void init (const Neighborhood &nh)
 
void init (const bool array[3 *3 *3])
 
void reset ()
 Remove all neighbors from neighborhood. More...
 
void set (int i, int j, int k)
 Put a neighbor at (i,j,k) (do nothing if already there) More...
 
void set (const numeric_array< int, 3 > &v)
 Put a neighbor at position v (do nothing if already there) More...
 
void remove (int i, int j, int k)
 Remove the neighbor (i,j,k) (do nothing if it was not there in the first place) More...
 
void remove (const numeric_array< int, 3 > &v)
 Remove the neighbor v (do nothing if it was not there in the first place) More...
 
bool isNeighbor (int i, int j, int k) const
 
bool isNeighbor (const numeric_array< int, 3 > &v)
 
template<typename TFunctor >
void for_all_neighbors (const TFunctor &functor)
 
template<int i, int j, int k>
INLINE bool isNeighbor () const
 

Detailed Description

Definition at line 212 of file Neighborhood.h.

Member Typedef Documentation

◆ Self

Definition at line 216 of file Neighborhood.h.

Constructor & Destructor Documentation

◆ Neighborhood() [1/4]

til::Neighborhood::Neighborhood ( )
inline

No neighbors.

Definition at line 221 of file Neighborhood.h.

◆ Neighborhood() [2/4]

til::Neighborhood::Neighborhood ( const Neighborhood nh)
inline

Copy constructor.

Definition at line 224 of file Neighborhood.h.

◆ Neighborhood() [3/4]

til::Neighborhood::Neighborhood ( const bool  array[3 *3 *3])
inline

from C array

Definition at line 227 of file Neighborhood.h.

◆ Neighborhood() [4/4]

til::Neighborhood::Neighborhood ( bool  n000,
bool  n001,
bool  n002,
bool  n010,
bool  n011,
bool  n012,
bool  n020,
bool  n021,
bool  n022,
bool  n100,
bool  n101,
bool  n102,
bool  n110,
bool  n111,
bool  n112,
bool  n120,
bool  n121,
bool  n122,
bool  n200,
bool  n201,
bool  n202,
bool  n210,
bool  n211,
bool  n212,
bool  n220,
bool  n221,
bool  n222 
)
inline

manual

Definition at line 230 of file Neighborhood.h.

Member Function Documentation

◆ for_all_neighbors()

template<typename TFunctor >
void til::Neighborhood::for_all_neighbors ( const TFunctor &  functor)
inline

Definition at line 306 of file Neighborhood.h.

References COFFSET, and FOR_ALL_NEIGHBORS.

◆ init() [1/2]

void til::Neighborhood::init ( const Neighborhood nh)
inline

Definition at line 255 of file Neighborhood.h.

References init().

Referenced by init().

◆ init() [2/2]

void til::Neighborhood::init ( const bool  array[3 *3 *3])
inline

Definition at line 258 of file Neighborhood.h.

◆ isNeighbor() [1/3]

bool til::Neighborhood::isNeighbor ( int  i,
int  j,
int  k 
) const
inline

Definition at line 295 of file Neighborhood.h.

References til::contains().

◆ isNeighbor() [2/3]

bool til::Neighborhood::isNeighbor ( const numeric_array< int, 3 > &  v)
inline

Definition at line 300 of file Neighborhood.h.

References EXPAND_VECTOR.

◆ isNeighbor() [3/3]

template<int i, int j, int k>
INLINE bool til::Neighborhood::isNeighbor ( ) const
inline

Definition at line 321 of file Neighborhood.h.

References til::contains(), INLINE, til::N18(), til::N26(), and til::N6().

◆ remove() [1/2]

void til::Neighborhood::remove ( int  i,
int  j,
int  k 
)
inline

Remove the neighbor (i,j,k) (do nothing if it was not there in the first place)

Definition at line 282 of file Neighborhood.h.

◆ remove() [2/2]

void til::Neighborhood::remove ( const numeric_array< int, 3 > &  v)
inline

Remove the neighbor v (do nothing if it was not there in the first place)

Definition at line 288 of file Neighborhood.h.

References EXPAND_VECTOR.

◆ reset()

void til::Neighborhood::reset ( )
inline

Remove all neighbors from neighborhood.

Definition at line 266 of file Neighborhood.h.

◆ set() [1/2]

void til::Neighborhood::set ( int  i,
int  j,
int  k 
)
inline

Put a neighbor at (i,j,k) (do nothing if already there)

Definition at line 269 of file Neighborhood.h.

◆ set() [2/2]

void til::Neighborhood::set ( const numeric_array< int, 3 > &  v)
inline

Put a neighbor at position v (do nothing if already there)

Definition at line 275 of file Neighborhood.h.

References EXPAND_VECTOR.


The documentation for this class was generated from the following file: