AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
autopas::VerletListHelpers< Particle_T >::NeighborListCRS Struct Reference

Flat Compressed-Row-Storage (CRS) neighbor list. More...

#include <VerletListHelpers.h>

Public Member Functions

size_t size () const
 Number of particles tracked by this list.
 
size_t count (const size_t i) const
 Number of neighbors of particle i.
 
const size_t * begin (const size_t i) const
 Pointer to the first neighbor index of particle i (const).
 
size_t * begin (const size_t i)
 Pointer to the first neighbor index of particle i (mutable).
 
std::span< const size_t > getNeighbors (const size_t i) const
 Returns a span of the neighbors of particle i.
 

Public Attributes

std::vector< size_t > offsets
 size N+1
 
std::vector< size_t, AlignedAllocator< size_t > > indices
 flat neighbor indices
 

Detailed Description

template<class Particle_T>
struct autopas::VerletListHelpers< Particle_T >::NeighborListCRS

Flat Compressed-Row-Storage (CRS) neighbor list.

For particle i:

Member Function Documentation

◆ begin() [1/2]

template<class Particle_T >
size_t * autopas::VerletListHelpers< Particle_T >::NeighborListCRS::begin ( const size_t  i)
inline

Pointer to the first neighbor index of particle i (mutable).

Parameters
iparticle index
Returns
pointer to the first neighbor index

◆ begin() [2/2]

template<class Particle_T >
const size_t * autopas::VerletListHelpers< Particle_T >::NeighborListCRS::begin ( const size_t  i) const
inline

Pointer to the first neighbor index of particle i (const).

Parameters
iparticle index
Returns
pointer to the first neighbor index

◆ count()

template<class Particle_T >
size_t autopas::VerletListHelpers< Particle_T >::NeighborListCRS::count ( const size_t  i) const
inline

Number of neighbors of particle i.

Parameters
iparticle index
Returns
number of neighbors

◆ getNeighbors()

template<class Particle_T >
std::span< const size_t > autopas::VerletListHelpers< Particle_T >::NeighborListCRS::getNeighbors ( const size_t  i) const
inline

Returns a span of the neighbors of particle i.

Parameters
iparticle index
Returns
span of neighbor indices

◆ size()

template<class Particle_T >
size_t autopas::VerletListHelpers< Particle_T >::NeighborListCRS::size ( ) const
inline

Number of particles tracked by this list.

Returns
number of particles

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