Shift node location.
Public Member Functions | |
template<typename Loc , int nd = Loc::dimension(), CONCEPT_REQUIRES_(Location< Loc >{}) > | |
auto | operator() (Loc loc, std::array< num_t, nd > offset, uint_t level=Loc::max_level()) const noexcept-> Loc |
Shifts the location loc by normalized offset at level . More... | |
template<typename Loc , std::size_t nd, CONCEPT_REQUIRES_(Location< Loc >{}) > | |
auto | operator() (Loc loc, std::array< int_t, nd > offset) const noexcept-> compact_optional< Loc > |
Shifts the location loc by offset . More... | |
|
noexcept |
Shifts the location loc
by normalized offset
at level
.
TODO: if offset is out of bounds -> undefined behavior (right now an assertion triggers in location's constructor)
References ndtree::v1::math::ipow().
|
noexcept |
Shifts the location loc
by offset
.
If the resulting location is out-of-bounds the optional_location won't contain a valid value.