8#include <nk/value/value.hpp>
11#include <memory_resource>
21namespace nk::runtime {
35Value map(std::pmr::memory_resource *mr =
nullptr);
92namespace nk::containers {
93using namespace ::nk::runtime::containers;
Core MATLAB-compatible multidimensional array and scalar value type.
Value values(const Value &m, std::pmr::memory_resource *mr=nullptr)
Extracts all values from container as an array or cell array.
Value get(const Value &m, const Value &key)
Looks up value associated with specified key (throws if key absent).
void remove(Value &m, const Value &key)
Removes specified key and its associated value from container.
void registerContainersRuntime(Engine &engine)
Registers containers.Map and dictionary builtins in the engine.
Value map(std::pmr::memory_resource *mr=nullptr)
Creates an empty containers.Map (handle semantics: copies alias shared state).
std::size_t count(const Value &m)
Returns the number of key-value pairs in container.
void set(Value &m, const Value &key, const Value &val)
Inserts or updates key-value pair in container in place.
Value keys(const Value &m, std::pmr::memory_resource *mr=nullptr)
Extracts all keys from container as a column array.
Value dictionary(std::pmr::memory_resource *mr=nullptr)
Creates an empty dictionary (value semantics: copies are independent).
bool isKey(const Value &m, const Value &key)
Checks whether specified key exists in container.