nk 1.0.0
C++ Numerical Computing Runtime
Loading...
Searching...
No Matches
buffer.hpp
Go to the documentation of this file.
1
3// toolboxes/signal/include/nk/signal/digital_filtering/buffer.hpp
4//
5// `buffer` — partition a signal into
6// (possibly overlapping or underlapping) frames.
7
8#pragma once
9
10#include <memory_resource>
11#include <nk/value/value.hpp>
12#include <string>
13#include <tuple>
14
15namespace nk::signal {
16
19
20
38Value buffer(const Value &x, int n, int p = 0,
39 const Value &opt = Value::Empty,
40 std::pmr::memory_resource *mr = nullptr);
41
55std::tuple<Value, Value>
56buffer2(const Value &x, int n, int p = 0,
57 const Value &opt = Value::Empty,
58 std::pmr::memory_resource *mr = nullptr);
59
60
62} // namespace nk::signal
Core MATLAB-compatible multidimensional array and scalar value type.
Definition value.hpp:61
static const Value Empty
MATLAB-style empty matrix sentinel — a 0×0 DOUBLE value.
Definition value.hpp:136
std::tuple< Value, Value > buffer2(const Value &x, int n, int p=0, const Value &opt=Value::Empty, std::pmr::memory_resource *mr=nullptr)
2-output form: [Y, Z] = buffer(x, n, p, opt).
Value buffer(const Value &x, int n, int p=0, const Value &opt=Value::Empty, std::pmr::memory_resource *mr=nullptr)
Partition x into frames of length n.