nk 1.0.0
C++ Numerical Computing Runtime
Loading...
Searching...
No Matches
shiftdata.hpp
Go to the documentation of this file.
1
3// toolboxes/signal/include/nk/signal/digital_filtering/shiftdata.hpp
4//
5// shiftdata + unshiftdata (Phase 4.4):
6// utilities for writing dim-aware functions. shiftdata moves the
7// chosen dim to dim 1 (leading); unshiftdata reverses.
8
9#pragma once
10
11#include <memory_resource>
12#include <nk/value/value.hpp>
13#include <tuple>
14
15namespace nk::signal {
16
19
20
41std::tuple<Value, Value, Value>
42shiftdata(const Value & x,
43 int dim = 0,
44 std::pmr::memory_resource * mr = nullptr);
45
58Value unshiftdata(const Value &x, const Value &perm, const Value &nshifts,
59 std::pmr::memory_resource *mr = nullptr);
60
61
63} // namespace nk::signal
Core MATLAB-compatible multidimensional array and scalar value type.
Definition value.hpp:61
std::tuple< Value, Value, Value > shiftdata(const Value &x, int dim=0, std::pmr::memory_resource *mr=nullptr)
Move a chosen dimension to the leading axis for dim-aware processing.
Value unshiftdata(const Value &x, const Value &perm, const Value &nshifts, std::pmr::memory_resource *mr=nullptr)
Inverse of shiftdata.