faunus
Public Types | Public Member Functions | List of all members
Faunus::CellList::Container::AbstractContainer< TMember, TIndex > Struct Template Referenceabstract

An interface of a container. More...

#include <celllist.h>

Inheritance diagram for Faunus::CellList::Container::AbstractContainer< TMember, TIndex >:
Inheritance graph
[legend]

Public Types

using ContainerType = AbstractContainer< TMember, TIndex >
 
using Index = TIndex
 the cell index (key) type
 
using Member = TMember
 the cell member (primitive value) type
 
using Members = std::vector< Member >
 the cell members type
 

Public Member Functions

virtual const Membersget (TIndex) const =0
 Gets cell members at the given cell index.
 
virtual Membersget (TIndex)=0
 Gets cell members at the given cell index.
 
virtual const MembersgetEmpty () const =0
 Gets cell members of an empty cell. Allows non-existing cells.
 
virtual std::vector< TIndex > indices () const =0
 Gets indicies of non-empty cells. More...
 

Detailed Description

template<typename TMember, typename TIndex>
struct Faunus::CellList::Container::AbstractContainer< TMember, TIndex >

An interface of a container.

The container is responsible for storing (and retriving) members under a given cell index. Various storage policies may be used in different implementations, e.g., a vector or a map.

Template Parameters
TMembera member type
TIndexan index type, see GridType::CellIndex

Member Function Documentation

◆ indices()

template<typename TMember , typename TIndex >
virtual std::vector<TIndex> Faunus::CellList::Container::AbstractContainer< TMember, TIndex >::indices ( ) const
pure virtual

Gets indicies of non-empty cells.

All non-empty cells are included. However, not all cells included must be non-empty.

Implemented in Faunus::CellList::Container::SparseContainer< TMember, TIndex >, and Faunus::CellList::Container::DenseContainer< TMember, TIndex >.


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