RepastHPC  2.3.1
Public Member Functions | Friends | List of all members
repast::Neighbors Class Reference

Provides lookup of grid topology process neighbors given a point in the pan process grid. More...

#include <SharedBaseGrid.h>

Public Member Functions

 Neighbors (int numberOfNeighbors)
 
void addNeighbor (Neighbor *ngh, RelativeLocation relLoc)
 Adds a neighbor at the specified location.
 
Neighborneighbor (RelativeLocation) const
 Gets the neighbor at the specified location. More...
 
NeighborfindNeighbor (const std::vector< int > &pt)
 Finds the neighbor that contains the specified point. More...
 
NeighborfindNeighbor (const std::vector< double > &pt)
 Finds the neighbor that contains the specified point. More...
 
void getNeighborRanks (std::set< int > &ranks)
 
NeighborgetNeighborByIndex (int index)
 

Friends

std::ostream & operator<< (std::ostream &os, const Neighbors &nghs)
 

Detailed Description

Provides lookup of grid topology process neighbors given a point in the pan process grid.

Member Function Documentation

◆ findNeighbor() [1/2]

Neighbor * repast::Neighbors::findNeighbor ( const std::vector< double > &  pt)

Finds the neighbor that contains the specified point.

Returns
the found neighbor

◆ findNeighbor() [2/2]

Neighbor * repast::Neighbors::findNeighbor ( const std::vector< int > &  pt)

Finds the neighbor that contains the specified point.

Returns
the found neighbor

◆ neighbor()

Neighbor * repast::Neighbors::neighbor ( RelativeLocation  relLoc) const

Gets the neighbor at the specified location.

Parameters
locationthe location of the neighbor.

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