Point on a Morton space filling curve. More...
Public Types | |
using | point_t = flecsi::util::point< double, DIM > |
Point type to represent coordinates. | |
Public Types inherited from filling_curve_key< DIM, T, morton_key< DIM, T > > | |
using | int_t = T |
Integer type used to represent the key. | |
Public Member Functions | |
point_t | coordinates (const std::array< point_t, 2 > &range) const |
Convert this key to coordinates in range. | |
morton_key (const std::array< point_t, 2 > &range, const point_t &p, const std::size_t depth=max_depth_) | |
Create a Morton key at a specific depth. | |
std::array< point_t, 2 > | range (const std::array< point_t, 2 > &range) const |
Compute the bounding box of a branch from its key in the overall domain The space is recursively decomposed regarding the dimension. | |
Public Member Functions inherited from filling_curve_key< DIM, T, morton_key< DIM, T > > | |
std::size_t | depth () const |
Find the depth of the current key. | |
constexpr | filling_curve_key () |
Default constructor: create an invalid key containing only zeros. | |
constexpr | filling_curve_key (int_t value) |
Construct a key from an integer of type int_t. | |
int_t | last_value () const |
Return the last bits of the key. | |
constexpr filling_curve_key | parent () const |
Return the parent of this key (depth - 1) | |
int_t | pop () |
Pop last bits and return its value. | |
void | pop (std::size_t d) |
Pop the depth d bits from the end of this key. | |
constexpr auto | push (int_t bits) const |
Push bits onto the end of this key. | |
constexpr int_t | value () const |
Get the value associated to this key. | |
constexpr bool | operator<= (const filling_curve_key &bid) const |
Less than or equal to operator. | |
constexpr bool | operator>= (const filling_curve_key &bid) const |
Greater than or equal to operator. | |
constexpr bool | operator> (const filling_curve_key &bid) const |
Greater than operator. | |
constexpr bool | operator< (const filling_curve_key &bid) const |
Less than operator. | |
constexpr bool | operator!= (const filling_curve_key &bid) const |
Inequality operator. | |
Additional Inherited Members | |
Static Public Member Functions inherited from filling_curve_key< DIM, T, morton_key< DIM, T > > | |
static constexpr morton_key< DIM, T > | max () |
Biggest value possible at max_depth. | |
static constexpr std::size_t | max_depth () |
Max depth possible for this type of key. | |
static constexpr morton_key< DIM, T > | min () |
Smallest value possible at max_depth. | |
static constexpr morton_key< DIM, T > | root () |
Get the root key (depth 0) | |
Protected Attributes inherited from filling_curve_key< DIM, T, morton_key< DIM, T > > | |
int_t | value_ |
Value of the filling curve key. | |
Point on a Morton space filling curve.
using point_t = flecsi::util::point<double, DIM> |
Point type to represent coordinates.
morton_key | ( | const std::array< point_t, 2 > & | range, |
const point_t & | p, | ||
const std::size_t | depth = max_depth_ |
||
) |
Create a Morton key at a specific depth.
range | The bounding box of the overall domain |
p | The point that the key will represent in the range |
depth | The depth at which to generate the key. |
point_t coordinates | ( | const std::array< point_t, 2 > & | range | ) | const |
Convert this key to coordinates in range.
range | The bounding box of the overall domain |
std::array< point_t, 2 > range | ( | const std::array< point_t, 2 > & | range | ) | const |
Compute the bounding box of a branch from its key in the overall domain The space is recursively decomposed regarding the dimension.
range | The bounding box of the overall domain |