Name
SPVM::R::OP::Long - N-Dimensional Array Operations for R::NDArray::Long
Description
The R::OP::Long class in SPVM has methods for n-dimensional array operations for R::NDArray::Long.
Usage
use R::OP::Long as LOP;
my $ndarray_scalar = LOP->c((int)1);
my $ndarray_vector = LOP->c([(int)1, 2, 3]);
my $ndarray = LOP->c([(int)1, 2, 3, 4, 5, 6], [3, 2]);
my $ndarray2 = LOP->c($ndarray);
Class Methods
c
static method c : R::NDArray::Long ($data : object of Long|int[]|R::NDArray::Long, $dim : int[] = undef);
add
static method add : R::NDArray::Long ($x_ndarray : R::NDArray::Long, $y_ndarray : R::NDArray::Long);
sub
static method sub : R::NDArray::Long ($x_ndarray : R::NDArray::Long, $y_ndarray : R::NDArray::Long);
mul
static method mul : R::NDArray::Long ($x_ndarray : R::NDArray::Long, $y_ndarray : R::NDArray::Long);
scamul
static method scamul : R::NDArray::Long ($x_ndarray : R::NDArray::Long, $scalar_ndarray : R::NDArray::Long);
div
static method div : R::NDArray::Long ($x_ndarray : R::NDArray::Long, $y_ndarray : R::NDArray::Long);
scadiv
static method scadiv : R::NDArray::Long ($x_ndarray : R::NDArray::Long, $scalar_ndarray : R::NDArray::Long);
div_u
static method div_u : R::NDArray::Long ($x_ndarray : R::NDArray::Long, $y_ndarray : R::NDArray::Long);
mod
static method mod : R::NDArray::Long ($x_ndarray : R::NDArray::Long, $y_ndarray : R::NDArray::Long);
mod_u
static method mod_u : R::NDArray::Long ($x_ndarray : R::NDArray::Long, $y_ndarray : R::NDArray::Long);
neg
static method neg : R::NDArray::Long ($x_ndarray : R::NDArray::Long);
abs
static method abs : R::NDArray::Long ($x_ndarray : R::NDArray::Long);
rep
static method rep : R::NDArray::Long ($x_ndarray : R::NDArray::Long, $times : int);
rep_length
static method rep_length : R::NDArray::Long ($x_ndarray : R::NDArray::Long, $length : int);
seq
static method seq : R::NDArray::Long ($begin : long, $end : long, $by : long = 1);
eq
static method eq : R::NDArray::Int ($x_ndarray : R::NDArray::Long, $y_ndarray : R::NDArray::Long);
ne
static method ne : R::NDArray::Int ($x_ndarray : R::NDArray::Long, $y_ndarray : R::NDArray::Long);
gt
static method gt : R::NDArray::Int ($x_ndarray : R::NDArray::Long, $y_ndarray : R::NDArray::Long);
ge
static method ge : R::NDArray::Int ($x_ndarray : R::NDArray::Long, $y_ndarray : R::NDArray::Long);
lt
static method lt : R::NDArray::Int ($x_ndarray : R::NDArray::Long, $y_ndarray : R::NDArray::Long);
le
static method le : R::NDArray::Int ($x_ndarray : R::NDArray::Long, $y_ndarray : R::NDArray::Long);
sum
static method sum : R::NDArray::Long ($x_ndarray : R::NDArray::Long);
cumsum
static method cumsum : R::NDArray::Long ($x_ndarray : R::NDArray::Long);
prod
static method prod : R::NDArray::Long ($x_ndarray : R::NDArray::Long);
cumprod
static method cumprod : R::NDArray::Long ($x_ndarray : R::NDArray::Long);
diff
static method diff : R::NDArray::Long ($x_ndarray : R::NDArray::Long);
max
static method max : R::NDArray::Long ($x_ndarray : R::NDArray::Long);
min
static method min : R::NDArray::Long ($x_ndarray : R::NDArray::Long);
See Also
Copyright & License
Copyright (c) 2024 Yuki Kimoto
MIT License