seams-core v2.14.0
libyodaLib, the C++ engine of d-SEAMS
Loading...
Searching...
No Matches
ring::NeighBond Class Reference

Membership of the neighbour rows after the leading self entry. More...

#include <src/include/internal/topo_bulk.hpp>

Public Member Functions

void build (const std::vector< std::vector< int > > &nList)
void row (int i, const int *&begin, const int *&end) const
bool operator() (int i, int j) const

Detailed Description

Membership of the neighbour rows after the leading self entry.

Definition at line 257 of file topo_bulk.hpp.

Member Function Documentation

◆ build()

void ring::NeighBond::build ( const std::vector< std::vector< int > > & nList)

◆ operator()()

bool ring::NeighBond::operator() ( int i,
int j ) const
inlinenodiscard

Definition at line 272 of file topo_bulk.hpp.

272 {
273 const int *begin = nullptr;
274 const int *end = nullptr;
275 row(i, begin, end);
276 if (begin == nullptr) {
277 return false;
278 }
279 return std::binary_search(begin, end, j);
280 }
void row(int i, const int *&begin, const int *&end) const

◆ row()

void ring::NeighBond::row ( int i,
const int *& begin,
const int *& end ) const
inline

Definition at line 262 of file topo_bulk.hpp.

262 {
263 if (static_cast<unsigned>(i) >= static_cast<unsigned>(n_) || off_.empty()) {
264 begin = nullptr;
265 end = nullptr;
266 return;
267 }
268 begin = cols_.data() + off_[static_cast<std::size_t>(i)];
269 end = cols_.data() + off_[static_cast<std::size_t>(i + 1)];
270 }

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