BioDynaMo  v1.05.0-137fdb15
Public Member Functions | Private Member Functions | Private Attributes | List of all members
bdm::UniformGridEnvironment::NeighborIterator Struct Reference

An iterator that iterates over the boxes in this grid. More...

#include <uniform_grid_environment.h>

Collaboration diagram for bdm::UniformGridEnvironment::NeighborIterator:
[legend]

Public Member Functions

 NeighborIterator (UniformGridEnvironment *grid, const FixedSizeVector< const Box *, 27 > &neighbor_boxes, uint64_t grid_timestamp)
 
bool IsAtEnd () const
 
AgentHandle operator* () const
 
NeighborIteratoroperator++ ()
 Version where empty neighbor boxes are allowed. More...
 

Private Member Functions

NeighborIteratorForwardToNonEmptyBox (uint64_t grid_timestamp)
 

Private Attributes

UniformGridEnvironmentgrid_
 
const FixedSizeVector< const Box *, 27 > & neighbor_boxes_
 The 27 neighbor boxes that will be searched for agents. More...
 
Box::Iterator box_iterator_
 
uint64_t grid_timestamp_
 
uint16_t box_idx_ = 0
 The id of the box to be considered (i.e. value between 0 - 26) More...
 
bool is_end_ = false
 Flag to indicate that all the neighbor boxes have been searched through. More...
 

Detailed Description

An iterator that iterates over the boxes in this grid.

Definition at line 159 of file uniform_grid_environment.h.

Constructor & Destructor Documentation

◆ NeighborIterator()

bdm::UniformGridEnvironment::NeighborIterator::NeighborIterator ( UniformGridEnvironment grid,
const FixedSizeVector< const Box *, 27 > &  neighbor_boxes,
uint64_t  grid_timestamp 
)
inlineexplicit

Definition at line 160 of file uniform_grid_environment.h.

Member Function Documentation

◆ ForwardToNonEmptyBox()

NeighborIterator& bdm::UniformGridEnvironment::NeighborIterator::ForwardToNonEmptyBox ( uint64_t  grid_timestamp)
inlineprivate

Forwards the iterator to the next non empty box and returns itself If there are no non empty boxes is_end_ is set to true

Definition at line 204 of file uniform_grid_environment.h.

◆ IsAtEnd()

bool bdm::UniformGridEnvironment::NeighborIterator::IsAtEnd ( ) const
inline

Definition at line 175 of file uniform_grid_environment.h.

◆ operator*()

AgentHandle bdm::UniformGridEnvironment::NeighborIterator::operator* ( ) const
inline

Definition at line 177 of file uniform_grid_environment.h.

◆ operator++()

NeighborIterator& bdm::UniformGridEnvironment::NeighborIterator::operator++ ( )
inline

Version where empty neighbor boxes are allowed.

Definition at line 180 of file uniform_grid_environment.h.

Member Data Documentation

◆ box_idx_

uint16_t bdm::UniformGridEnvironment::NeighborIterator::box_idx_ = 0
private

The id of the box to be considered (i.e. value between 0 - 26)

Definition at line 198 of file uniform_grid_environment.h.

◆ box_iterator_

Box::Iterator bdm::UniformGridEnvironment::NeighborIterator::box_iterator_
private

The box that shall be considered to iterate over for finding simulation objects

Definition at line 195 of file uniform_grid_environment.h.

◆ grid_

UniformGridEnvironment* bdm::UniformGridEnvironment::NeighborIterator::grid_
private

Definition at line 190 of file uniform_grid_environment.h.

◆ grid_timestamp_

uint64_t bdm::UniformGridEnvironment::NeighborIterator::grid_timestamp_
private

Definition at line 196 of file uniform_grid_environment.h.

◆ is_end_

bool bdm::UniformGridEnvironment::NeighborIterator::is_end_ = false
private

Flag to indicate that all the neighbor boxes have been searched through.

Definition at line 200 of file uniform_grid_environment.h.

◆ neighbor_boxes_

const FixedSizeVector<const Box*, 27>& bdm::UniformGridEnvironment::NeighborIterator::neighbor_boxes_
private

The 27 neighbor boxes that will be searched for agents.

Definition at line 192 of file uniform_grid_environment.h.


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