Name
SPVM::R::NDArray::Hash - Hash of N-Dimensional Array.
Description
R::NDArray::Hash class in SPVM represents a data structure to store n-dimensional arrays in hash.
Usage
use R::NDArray::Hash;
use R::OP::Int as IOP;
my $ndarray = R::NDArray::Hash->new;
$ndarray->set("name", IOP->c([1, 2, 3]));
my $ndarray = $ndarray->get("name");
my $ndarray_int = $ndarray->get_int("name");
Field
ndarrays_h
has ndarrays_h : Hash of R::NDArray;
A Hash object to store n-dimensional arrays.
Class Methods
new
static method new : R::NDArray::Hash ();
Creates a new R::NDArray::Hash object.
set
method set : void ($name : string, $value : R::NDArray);
Sets the value of key $name to $value.
get
method get : R::NDArray ($name : string);
Returns the value of key $name.
Exceptions:
If $name is not found, an exception is thrown.
get_byte
method get_byte : R::NDArray::Byte ($name : string);
Same as "get" method, but the return type is different.
get_short
method get_short : R::NDArray::Short ($name : string);
Same as "get" method, but the return type is different.
get_int
method get_int : R::NDArray::Int ($name : string);
Same as "get" method, but the return type is different.
get_long
method get_long : R::NDArray::Long ($name : string);
Same as "get" method, but the return type is different.
get_float
method get_float : R::NDArray::Float ($name : string);
Same as "get" method, but the return type is different.
get_float_complex
method get_float_complex : R::NDArray::FloatComplex ($name : string);
Same as "get" method, but the return type is different.
get_double
method get_double : R::NDArray::Double ($name : string);
Same as "get" method, but the return type is different.
get_double_complex
method get_double_complex : R::NDArray::DoubleComplex ($name : string);
Same as "get" method, but the return type is different.
get_string
method get_string : R::NDArray::String ($name : string);
Same as "get" method, but the return type is different.
See Also
Copyright & License
Copyright (c) 2024 Yuki Kimoto
MIT License