faunus
Public Types | Public Member Functions | Protected Member Functions | List of all members
Faunus::CellList::SortableCellList< TContainer, TGrid > Class Template Reference

A mixing returning members in a cell in sorted order, e.g., for lookup or filtering. More...

#include <celllistimpl.h>

Inheritance diagram for Faunus::CellList::SortableCellList< TContainer, TGrid >:
Inheritance graph
[legend]
Collaboration diagram for Faunus::CellList::SortableCellList< TContainer, TGrid >:
Collaboration graph
[legend]

Public Types

using AbstractCellList = typename AbstractSortableCellList< ContainerTypeOf< TContainer >, GridTypeOf< TGrid > >::AbstractCellList
 
using Grid = TGrid
 
using Container = TContainer
 
- Public Types inherited from Faunus::CellList::CellListBase< TContainer, TGrid >
using AbstractCellList = AbstractImmutableCellList< ContainerTypeOf< TContainer >, GridTypeOf< TGrid > >
 
using Grid = TGrid
 
using Container = TContainer
 
using CellCoord = typename Grid::CoordOf< GridType >
 grid (cell) coordinates type
 
using CellIndex = typename Grid::IndexOf< GridType >
 grid (cell) index type
 
using GridType = TGridType
 abstract grid type
 
using Member = typename Container::MemberOf< ContainerType >
 member type
 
using Members = typename Container::MembersOf< ContainerType >
 members type
 
- Public Types inherited from Faunus::CellList::AbstractImmutableCellList< ContainerTypeOf< TContainer >, GridTypeOf< TGrid > >
using AbstractCellList = AbstractImmutableCellList< ContainerTypeOf< TContainer >, GridTypeOf< TGrid > >
 
using ContainerType = ContainerTypeOf< TContainer >
 abstract container types
 
using GridType = GridTypeOf< TGrid >
 abstract grid type
 
using Members = typename Container::MembersOf< ContainerType >
 members type
 
using Member = typename Container::MemberOf< ContainerType >
 member type
 
using CellIndex = typename Grid::IndexOf< GridType >
 grid (cell) index type
 
using CellCoord = typename Grid::CoordOf< GridType >
 grid (cell) coordinates type
 

Public Member Functions

const MembersgetSortedMembers (const CellCoord &cell_coordinates) override
 < members type More...
 
const MembersgetNeighborSortedMembers (const CellCoord &cell_coordinates, const CellCoord &cell_offset) override
 Get members of a neighbor cell in a sorted order. More...
 
 SortableCellList (const GridOf< TBase > &cell_grid)
 Construct an empty cell list from a grid. More...
 
 SortableCellList (const typename GridOf< TBase >::Point &box, const typename GridOf< TBase >::SpaceAxis cell_dimension)
 Construct an empty cell list knowing a box dimension and minimal cell dimension. More...
 
- Public Member Functions inherited from Faunus::CellList::CellListBase< TContainer, TGrid >
const MembersgetMembers (const CellCoord &cell_coordinates) override
 < members type More...
 
const MembersgetNeighborMembers (const CellCoord &cell_coordinates, const CellCoord &cell_offset) override
 Get cell members at given offseted cell coordinates, or empty if offseted dcoordinates do not exist. More...
 
std::vector< CellCoordgetCells () const override
 
CellIndex gridSize () const override
 
const TGrid & getGrid ()
 Static cast itself to a grid. More...
 
 CellListBase (const TGrid &cell_grid)
 Construct an empty cell list from a grid. More...
 
 CellListBase (const typename TGrid::Point &box, const typename TGrid::SpaceAxis cell_dimension)
 Construct an empty cell list knowing a box dimension and minimal cell dimension. More...
 

Protected Member Functions

void insert (const Member &member, const CellIndex &new_cell_index)
 
void remove (const Member &member, const CellIndex &old_cell_index)
 
const MembersgetSorted (const CellIndex cell_index)
 Get members in a sorted order. More...
 

Detailed Description

template<class TContainer, class TGrid>
class Faunus::CellList::SortableCellList< TContainer, TGrid >

A mixing returning members in a cell in sorted order, e.g., for lookup or filtering.

Sorting is performed on as-needed basis, i.e., only when requested and if modified since the last request.

Template Parameters
TBase

Constructor & Destructor Documentation

◆ SortableCellList() [1/2]

template<class TContainer , class TGrid >
Faunus::CellList::SortableCellList< TContainer, TGrid >::SortableCellList ( const GridOf< TBase > &  cell_grid)
inlineexplicit

Construct an empty cell list from a grid.

Parameters
cell_grid

◆ SortableCellList() [2/2]

template<class TContainer , class TGrid >
Faunus::CellList::SortableCellList< TContainer, TGrid >::SortableCellList ( const typename GridOf< TBase >::Point box,
const typename GridOf< TBase >::SpaceAxis  cell_dimension 
)
inline

Construct an empty cell list knowing a box dimension and minimal cell dimension.

Parameters
boxspatial dimension of the box
cell_dimensionminimal length of the cell's edge

Member Function Documentation

◆ getNeighborSortedMembers()

template<class TContainer , class TGrid >
const Members& Faunus::CellList::SortableCellList< TContainer, TGrid >::getNeighborSortedMembers ( const CellCoord cell_coordinates,
const CellCoord cell_offset 
)
inlineoverridevirtual

Get members of a neighbor cell in a sorted order.

Parameters
cell_coordinates
cell_offset
Returns
sorted members

Implements Faunus::CellList::AbstractSortableCellList< ContainerTypeOf< TContainer >, GridTypeOf< TGrid > >.

◆ getSorted()

template<class TContainer , class TGrid >
const Members& Faunus::CellList::SortableCellList< TContainer, TGrid >::getSorted ( const CellIndex  cell_index)
inlineprotected

Get members in a sorted order.

Parameters
cell_index
Returns
sorted members

◆ getSortedMembers()

template<class TContainer , class TGrid >
const Members& Faunus::CellList::SortableCellList< TContainer, TGrid >::getSortedMembers ( const CellCoord cell_coordinates)
inlineoverridevirtual

< members type

Get members in a sorted order.

Parameters
cell_coordinates
Returns
sorted members

Implements Faunus::CellList::AbstractSortableCellList< ContainerTypeOf< TContainer >, GridTypeOf< TGrid > >.


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