OpenFPM_data  0.1.0
Project that contain the implementation and interfaces for basic structure like vectors, grids, graph ... .
 All Data Structures Namespaces Functions Variables Typedefs Friends
grid_key_dx< dim > Class Template Reference

grid_key_dx is the key to access any element in the grid More...

Detailed Description

template<unsigned int dim>
class grid_key_dx< dim >

grid_key_dx is the key to access any element in the grid

Given a grid in general a set of indexes define one element in the grid For example 2 indexes identify one element on a two dimensional grid, 3 indexes on a 3 dimensional grid ...

Template Parameters
dimdimensionality of the grid

Definition at line 18 of file grid_key.hpp.

#include <grid_key.hpp>

Public Member Functions

template<typename exp1 >
 grid_key_dx (const grid_key_dx_expression< dim, exp1 > &exp)
 
 grid_key_dx ()
 Constructor.
 
 grid_key_dx (const grid_key_dx< dim > &key)
 Constructor from an other key.
 
 grid_key_dx (const size_t(&k)[dim])
 Constructor from buffer reference.
 
 grid_key_dx (const long int(&k)[dim])
 Constructor from buffer reference.
 
template<typename... T>
 grid_key_dx (const comb< dim > &cmb)
 Construct a grid key from a list of numbers.
 
template<typename... T>
 grid_key_dx (const size_t v, const T...t)
 Construct a grid key from a list of numbers.
 
void zero ()
 
void one ()
 
void invalid ()
 
grid_key_dx< dim > & operator+= (const grid_key_dx< dim > &p)
 
grid_key_dx< dim > & operator-= (const grid_key_dx< dim > &p)
 
grid_key_dx_sum< dim,
grid_key_dx< dim >
, grid_key_dx< dim > > 
operator+ (const grid_key_dx< dim > &p) const
 
grid_key_dx_sum< dim,
grid_key_dx< dim >, Point< dim,
long int > > 
operator+ (const Point< dim, long int > &p) const
 
grid_key_dx_sum< dim,
grid_key_dx< dim >, comb< dim > > 
operator+ (const comb< dim > &cmb) const
 
grid_key_dx_sub< dim,
grid_key_dx< dim >
, grid_key_dx< dim > > 
operator- (const grid_key_dx< dim > &cmb) const
 
template<typename T >
grid_key_dx_sub< dim,
grid_key_dx< dim >
, grid_key_dx_expression< dim,
T > > 
operator- (const grid_key_dx_expression< dim, T > &cmb) const
 
template<unsigned int dim_t>
bool operator== (const grid_key_dx< dim_t > &key_t)
 
template<typename a , typename... T>
void set (a v, T...t)
 set the grid key from a list of numbers
 
Point< dim, long int > toPointS () const
 Convert to a point the grid_key_dx. More...
 
std::string to_string ()
 convert the information into a string More...
 
Point< dim, size_t > toPoint () const
 Convert to a point the grid_key_dx. More...
 
mem_id value (size_t i) const
 Get the i index. More...
 
mem_id get (size_t i) const
 Get the i index. More...
 
void set_d (size_t i, mem_id id)
 Set the i index. More...
 

Data Fields

mem_id k [dim]
 structure that store all the index
 

Private Member Functions

template<typename a , typename... T>
void invert_assign (a v, T...t)
 Recursively invert the assignment. More...
 
template<typename a , typename... T>
void invert_assign (a v)
 
void invert_assign ()
 

Member Function Documentation

template<unsigned int dim>
mem_id grid_key_dx< dim >::get ( size_t  i) const
inline

Get the i index.

Parameters
iindex to get
Returns
the index value

Definition at line 302 of file grid_key.hpp.

template<unsigned int dim>
template<typename a , typename... T>
void grid_key_dx< dim >::invert_assign ( v,
T...  t 
)
inlineprivate

Recursively invert the assignment.

Recursively invert the assignment at compile-time

Definition at line 336 of file grid_key.hpp.

template<unsigned int dim>
void grid_key_dx< dim >::set_d ( size_t  i,
mem_id  id 
)
inline

Set the i index.

Set the i index

Parameters
iindex to set
idvalue to set

Definition at line 315 of file grid_key.hpp.

template<unsigned int dim>
std::string grid_key_dx< dim >::to_string ( )
inline

convert the information into a string

Returns
a string

Definition at line 259 of file grid_key.hpp.

template<unsigned int dim>
Point<dim,size_t> grid_key_dx< dim >::toPoint ( ) const
inline

Convert to a point the grid_key_dx.

See Also
toPointS

Definition at line 269 of file grid_key.hpp.

template<unsigned int dim>
Point<dim,long int> grid_key_dx< dim >::toPointS ( ) const
inline

Convert to a point the grid_key_dx.

See Also
toPoint

Definition at line 242 of file grid_key.hpp.

template<unsigned int dim>
mem_id grid_key_dx< dim >::value ( size_t  i) const
inline

Get the i index.

Parameters
iindex to get
Returns
the index value

Definition at line 289 of file grid_key.hpp.


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