5#include "Shape/Point.hpp"
6#include "Shape/Box.hpp"
7#include <boost/fusion/include/vector.hpp>
8#include "memory_ly/Encap.hpp"
25template<
unsigned int dim,
typename T>
43 for (
size_t d = 0 ; d < dim ; d++)
44 {this->
setLow(d,b.getLow(d));}
46 for (
size_t d = 0 ; d < dim ; d++)
47 {this->
setHigh(d,b.getHigh(d));}
59 for (
size_t d = 0 ; d < dim ; d++)
60 {this->
setLow(d,b.getLow(d));}
62 for (
size_t d = 0 ; d < dim ; d++)
63 {this->
setHigh(d,b.getHigh(d));}
101 for (
size_t d = 0 ; d < dim ; d++)
104 for (
size_t d = 0 ; d < dim ; d++)
117 for (
size_t d = 0 ; d < dim ; d++)
120 for (
size_t d = 0 ; d < dim ; d++)
154 for (
size_t d = 0 ; d < dim ; d++)
164 template<
typename S>
void rescale(S (& sp)[dim])
166 for (
size_t d = 0 ; d < dim ; d++)
180 for (
size_t d = 0 ; d < dim ; d++)
183 for (
size_t d = 0 ; d < dim ; d++)
195 template<
typename S>
void mul(S (& sp)[dim])
197 for (
size_t d = 0 ; d < dim ; d++)
200 for (
size_t d = 0 ; d < dim ; d++)
213 for (
size_t i = 0 ; i < dim ; i++)
226template<
unsigned int dim,
typename St>
This class represent an N-dimensional box.
__device__ __host__ T getLow(int i) const
get the i-coordinate of the low bound interval of the box
static const unsigned int p1
Low point.
__device__ __host__ T getHigh(int i) const
get the high interval of the box
__device__ __host__ void setHigh(int i, T val)
set the high interval of the box
static const unsigned int p2
High point.
__device__ __host__ void setLow(int i, T val)
set the low interval of the box
This class implement the point shape in an N-dimensional space.
__device__ __host__ const T & get(unsigned int i) const
Get coordinate.
This class represent an N-dimensional box.
void mul(S(&sp)[dim])
multiply the space box with the coefficient defined in sp
Point< dim, T > rnd()
Generate a random point inside the box.
SpaceBox(std::initializer_list< T > p1, std::initializer_list< T > p2)
Constructor from initializer list.
SpaceBox< dim, T > & operator=(const Box< dim, T > &b)
Define the box from a box shape.
SpaceBox(const encapc< dim_s, Box< dim, T >, Mem > &box)
Constructor from a Box.
void rescale(S(&sp)[dim])
Re-scale the space box with the coefficient defined in sp.
void mul(T(&sp)[dim])
multiply the space box with the coefficient defined in sp
SpaceBox(const Box< dim, T > &b)
constructor from a box
void rescale(T(&sp)[dim])
Re-scale the space box with the coefficient defined in sp.
SpaceBox(const Box< dim, S > &b)
constructor from a Box of different type
SpaceBox(const SpaceBox< dim, T > &b)
constructor from a SpaceBox
SpaceBox(const encapc< dim_s, SpaceBox< dim, T >, Mem > &box)
Constructor from a Box.
check if T::type and T.data has the same type