Data type construction, inspection, structures, cell arrays, and limits. More...
#include <memory_resource>#include <string>#include <vector>#include <nk/value/value.hpp>#include <nk/value/span.hpp>Go to the source code of this file.
Functions | |
| Value | nk::builtin::isfield (const Value &s, const std::string &field, std::pmr::memory_resource *mr=nullptr) |
| Tests if structure contains field by string name (isfield(s, field)). | |
| Value | nk::builtin::getfield (const Value &s, const std::string &field, std::pmr::memory_resource *mr=nullptr) |
| Gets value of structure field by string name (getfield(s, field)). | |
| Value | nk::builtin::setfield (const Value &s, const std::string &field, const Value &val, std::pmr::memory_resource *mr=nullptr) |
| Sets value of structure field by string name (setfield(s, field, val)). | |
| Value | nk::builtin::rmfield (const Value &s, const std::string &field, std::pmr::memory_resource *mr=nullptr) |
| Removes field from structure by string name (rmfield(s, field)). | |
| Value | nk::builtin::toDouble (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Converts input array to double-precision floating point (double(x)). | |
| Value | nk::builtin::single (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Converts input array to single-precision floating point (single(x)). | |
| Value | nk::builtin::int8 (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Converts input array to 8-bit signed integer (int8(x)). | |
| Value | nk::builtin::int16 (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Converts input array to 16-bit signed integer (int16(x)). | |
| Value | nk::builtin::int32 (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Converts input array to 32-bit signed integer (int32(x)). | |
| Value | nk::builtin::int64 (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Converts input array to 64-bit signed integer (int64(x)). | |
| Value | nk::builtin::uint8 (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Converts input array to 8-bit unsigned integer (uint8(x)). | |
| Value | nk::builtin::uint16 (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Converts input array to 16-bit unsigned integer (uint16(x)). | |
| Value | nk::builtin::uint32 (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Converts input array to 32-bit unsigned integer (uint32(x)). | |
| Value | nk::builtin::uint64 (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Converts input array to 64-bit unsigned integer (uint64(x)). | |
| Value | nk::builtin::logical (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Converts input array to logical boolean array (logical(x)). | |
| Value | nk::builtin::iscell (const Value &v, std::pmr::memory_resource *mr=nullptr) |
| Tests if input is a cell array (iscell(v)). | |
| Value | nk::builtin::isstruct (const Value &v, std::pmr::memory_resource *mr=nullptr) |
| Tests if input is a structure (isstruct(v)). | |
| Value | nk::builtin::isnumeric (const Value &v, std::pmr::memory_resource *mr=nullptr) |
| Tests if input is numeric (double, single, integer) (isnumeric(v)). | |
| Value | nk::builtin::isfloat (const Value &v, std::pmr::memory_resource *mr=nullptr) |
| Tests if input is a floating-point type (single or double) (isfloat(v)). | |
| Value | nk::builtin::isinteger (const Value &v, std::pmr::memory_resource *mr=nullptr) |
| Tests if input is an integer class (isinteger(v)). | |
| Value | nk::builtin::islogical (const Value &v, std::pmr::memory_resource *mr=nullptr) |
| Tests if input is logical type (islogical(v)). | |
| Value | nk::builtin::ischar (const Value &v, std::pmr::memory_resource *mr=nullptr) |
| Tests if input is character array (ischar(v)). | |
| Value | nk::builtin::isstring (const Value &v, std::pmr::memory_resource *mr=nullptr) |
| Tests if input is string array (isstring(v)). | |
| Value | nk::builtin::isnan (const Value &v, std::pmr::memory_resource *mr=nullptr) |
| Tests array elements for NaN (isnan(v)). | |
| Value | nk::builtin::isinf (const Value &v, std::pmr::memory_resource *mr=nullptr) |
| Tests array elements for Infinity (isinf(v)). | |
| Value | nk::builtin::isfinite (const Value &v, std::pmr::memory_resource *mr=nullptr) |
| Tests array elements for finiteness (isfinite(v)). | |
| Value | nk::builtin::isempty (const Value &v, std::pmr::memory_resource *mr=nullptr) |
| Tests if array is empty (any dimension is 0) (isempty(v)). | |
| Value | nk::builtin::isscalar (const Value &v, std::pmr::memory_resource *mr=nullptr) |
| Tests if input is a 1x1 scalar (isscalar(v)). | |
| Value | nk::builtin::isvector (const Value &v, std::pmr::memory_resource *mr=nullptr) |
| Tests if input is a 1-D vector (1xN or Nx1) (isvector(v)). | |
| Value | nk::builtin::isrow (const Value &v, std::pmr::memory_resource *mr=nullptr) |
| Tests if input is a 1xN row vector (isrow(v)). | |
| Value | nk::builtin::iscolumn (const Value &v, std::pmr::memory_resource *mr=nullptr) |
| Tests if input is an Nx1 column vector (iscolumn(v)). | |
| Value | nk::builtin::ismatrix (const Value &v, std::pmr::memory_resource *mr=nullptr) |
| Tests if input is a 2-D matrix (ismatrix(v)). | |
| Value | nk::builtin::issingle (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Tests if input is single-precision floating point (issingle(x)). | |
| Value | nk::builtin::issparse (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Tests if input is a sparse array (issparse(x)). | |
| Value | nk::builtin::ismissing (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Finds missing entries in array using default standard missing indicators (ismissing(x)). | |
| Value | nk::builtin::ismissing (const Value &x, const Value &indicator, std::pmr::memory_resource *mr=nullptr) |
| Finds missing entries in array matching user-specified indicators (ismissing(x, indicator)). | |
| Value | nk::builtin::issorted (const Value &x, const Value &mode=Value::Empty, std::pmr::memory_resource *mr=nullptr) |
| Determines if array elements are sorted in ascending or descending order (issorted(x, mode)). | |
| Value | nk::builtin::isequal (const Value &a, const Value &b, std::pmr::memory_resource *mr=nullptr) |
| Determines if arrays are strictly identical in type, shape, and values (isequal(a, b)). | |
| Value | nk::builtin::isequaln (const Value &a, const Value &b, std::pmr::memory_resource *mr=nullptr) |
| Determines if arrays are equal, treating NaNs as equal (isequaln(a, b)). | |
| Value | nk::builtin::cast (const Value &v, const std::string &targetType, std::pmr::memory_resource *mr=nullptr) |
| Casts input array to target type name (cast(v, targetType)). | |
| Value | nk::builtin::standardizeMissing (const Value &x, const Value &indicator, std::pmr::memory_resource *mr=nullptr) |
| Replaces specified indicator values with standard missing values (standardizeMissing(x, indicator)). | |
| Value | nk::builtin::anymissing (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Tests if array contains any missing entries (anymissing(x)). | |
| Value | nk::builtin::isuniform (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Tests if array has uniform element spacing (isuniform(x)). | |
| Value | nk::builtin::classOf (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Returns the class name of an object or array (class(x)). | |
| Value | nk::builtin::swapbytes (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Swaps byte order of array elements between little-endian and big-endian (swapbytes(x)). | |
| Value | nk::builtin::typecast (const Value &x, const std::string &datatype, std::pmr::memory_resource *mr=nullptr) |
| Reinterprets binary data between datatypes without changing underlying bytes (typecast(x, datatype)). | |
| Value | nk::builtin::allfinite (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| True if all elements are finite numbers (allfinite(x)). | |
| Value | nk::builtin::anynan (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| True if any array element is NaN (anynan(x)). | |
| Value | nk::builtin::realmin (const std::string &className="double", std::pmr::memory_resource *mr=nullptr) |
| Smallest positive normalized floating-point number (realmin(className)). | |
| Value | nk::builtin::realmin (const Value &t, std::pmr::memory_resource *mr=nullptr) |
| Smallest positive normalized floating-point number (realmin(t)). | |
| Value | nk::builtin::realmax (const std::string &className="double", std::pmr::memory_resource *mr=nullptr) |
| Largest finite floating-point number (realmax(className)). | |
| Value | nk::builtin::realmax (const Value &t, std::pmr::memory_resource *mr=nullptr) |
| Largest finite floating-point number (realmax(t)). | |
| Value | nk::builtin::intmin (const std::string &className="int32", std::pmr::memory_resource *mr=nullptr) |
| Smallest integer value for specified integer class (intmin(className)). | |
| Value | nk::builtin::intmin (const Value &t, std::pmr::memory_resource *mr=nullptr) |
| Smallest integer value for specified integer class value (intmin(t)). | |
| Value | nk::builtin::intmax (const std::string &className="int32", std::pmr::memory_resource *mr=nullptr) |
| Largest integer value for specified integer class (intmax(className)). | |
| Value | nk::builtin::intmax (const Value &t, std::pmr::memory_resource *mr=nullptr) |
| Largest integer value for specified integer class value (intmax(t)). | |
| Value | nk::builtin::flintmax (const std::string &className="double", std::pmr::memory_resource *mr=nullptr) |
| Largest consecutive integer accurately representable in floating-point format (flintmax(className)). | |
| Value | nk::builtin::flintmax (const Value &t, std::pmr::memory_resource *mr=nullptr) |
| Largest consecutive integer accurately representable in floating-point format (flintmax(t)). | |
Data type construction, inspection, structures, cell arrays, and limits.
Provides a clean, engine-free C++ API for type predicates, structure manipulation, cell array queries, and numeric range limits.
Definition in file datatypes.hpp.