14 #ifndef SPATIAL_RANK_HPP
15 #define SPATIAL_RANK_HPP
17 #include "spatial_node.hpp"
29 template <dimension_type Value>
66 template<
typename Rank>
69 {
return (node_dim + 1) % rank(); }
77 template<
typename Rank>
80 {
return (rank() + node_dim - 1) % rank(); }
95 template <
typename Link,
typename Rank>
106 #endif // SPATIAL_RANK_HPP
dimension_type _rank
The value that stores the rank dimension.
The dimension value is stored by a member of the object, but can be modified at run time...
dimension_type modulo(const Node< Link > *x, Rank r)
Returns the modulo of a node's heigth by a container's rank.
The basic node for any tree in the library.
bool header(const Node< Link > *x)
Check if node is a header node.
std::size_t dimension_type
Defines the type for the dimension as being a size.
The dimension value is set by a template value, thus consuming no memory.
The main namespace used in the library.
dimension_type decr_dim(Rank rank, dimension_type node_dim)
Decrement dimension node_dim, given rank.
dimension_type operator()() const
Returns the dimension for the rank specified in the template parameter Value.
Node * parent
A pointer to the parent of the current node.
dimension_type operator()() const
Returns the dimension for the rank stored in _rank.
dimension_type incr_dim(Rank rank, dimension_type node_dim)
Increment dimension node_dim, given rank.
Dynamic_rank(dimension_type rank=1)
Build a rank with a default dimension of 1.