6#include <memory_resource>
7#include <nk/value/fn_handle.hpp>
8#include <nk/value/value.hpp>
18namespace nk::runtime {
20void registerCellsRuntime(Engine &engine);
21void registerCellfunCallbackBuiltin(Engine &engine);
31Value cell(
size_t n, std::pmr::memory_resource *mr =
nullptr);
39Value cell(
size_t rows,
size_t cols, std::pmr::memory_resource *mr =
nullptr);
50Value cell(
size_t rows,
size_t cols,
size_t pages, std::pmr::memory_resource *mr =
nullptr);
77 std::pmr::memory_resource *mr =
nullptr);
135 std::pmr::memory_resource *mr =
nullptr);
Core MATLAB-compatible multidimensional array and scalar value type.
static const Value Empty
MATLAB-style empty matrix sentinel — a 0×0 DOUBLE value.
Value iscellstr(const Value &c, std::pmr::memory_resource *mr=nullptr)
Test whether a cell array holds only char rows (tf = iscellstr(c)).
Value cell2mat(const Value &c, std::pmr::memory_resource *mr=nullptr)
Concatenate cells into a matrix (A = cell2mat(c)).
Value mat2cell(const Value &x, const Value &rowSizes, const Value &colSizes=Value::Empty, std::pmr::memory_resource *mr=nullptr)
Split a matrix into a cell array of blocks (c = mat2cell(A, R, C)).
Value num2cell(const Value &x, std::pmr::memory_resource *mr=nullptr)
Wrap each element in a scalar cell (c = num2cell(A)).
Value cell(size_t n, std::pmr::memory_resource *mr=nullptr)
Square cell array (c = cell(n)).
Value cellfun(FnHandle fn, const Value &c, bool uniformOutput, std::pmr::memory_resource *mr=nullptr)
Apply a callback to each cell (y = cellfun(fn, c, uniformOutput)).
Value cellstr(const Value &x, std::pmr::memory_resource *mr=nullptr)
Convert to cell-of-strings (c = cellstr(x)).