Name

SPVM::R::OP::Int - N-Dimensional Array Operations for R::NDArray::Int

Description

The R::OP::Int class in SPVM has methods for n-dimensional array operations for R::NDArray::Int.

Usage

use R::OP::Int as IOP;

my $ndarray_scalar = IOP->c((int)1);

my $ndarray_vector = IOP->c([(int)1, 2, 3]);

my $ndarray = IOP->c([(int)1, 2, 3, 4, 5, 6], [3, 2]);

my $ndarray2 = IOP->c($ndarray);

Class Methods

c

static method c : R::NDArray::Int ($data : object of Int|int[]|R::NDArray::Int, $dim : int[] = undef);

add

static method add : R::NDArray::Int ($x_ndarray : R::NDArray::Int, $y_ndarray : R::NDArray::Int);

sub

static method sub : R::NDArray::Int ($x_ndarray : R::NDArray::Int, $y_ndarray : R::NDArray::Int);

mul

static method mul : R::NDArray::Int ($x_ndarray : R::NDArray::Int, $y_ndarray : R::NDArray::Int);

scamul

static method scamul : R::NDArray::Int ($x_ndarray : R::NDArray::Int, $scalar_ndarray : R::NDArray::Int);

div

static method div : R::NDArray::Int ($x_ndarray : R::NDArray::Int, $y_ndarray : R::NDArray::Int);

scadiv

static method scadiv : R::NDArray::Int ($x_ndarray : R::NDArray::Int, $scalar_ndarray : R::NDArray::Int);

div_u

static method div_u : R::NDArray::Int ($x_ndarray : R::NDArray::Int, $y_ndarray : R::NDArray::Int);

mod

static method mod : R::NDArray::Int ($x_ndarray : R::NDArray::Int, $y_ndarray : R::NDArray::Int);

mod_u

static method mod_u : R::NDArray::Int ($x_ndarray : R::NDArray::Int, $y_ndarray : R::NDArray::Int);

neg

static method neg : R::NDArray::Int ($x_ndarray : R::NDArray::Int);

abs

static method abs : R::NDArray::Int ($x_ndarray : R::NDArray::Int);

eq

static method eq : R::NDArray::Int ($x_ndarray : R::NDArray::Int, $y_ndarray : R::NDArray::Int);

ne

static method ne : R::NDArray::Int ($x_ndarray : R::NDArray::Int, $y_ndarray : R::NDArray::Int);

gt

static method gt : R::NDArray::Int ($x_ndarray : R::NDArray::Int, $y_ndarray : R::NDArray::Int);

ge

static method ge : R::NDArray::Int ($x_ndarray : R::NDArray::Int, $y_ndarray : R::NDArray::Int);

lt

static method lt : R::NDArray::Int ($x_ndarray : R::NDArray::Int, $y_ndarray : R::NDArray::Int);

le

static method le : R::NDArray::Int ($x_ndarray : R::NDArray::Int, $y_ndarray : R::NDArray::Int);

rep

static method rep : R::NDArray::Int ($x_ndarray : R::NDArray::Int, $times : int);

rep_length

static method rep_length : R::NDArray::Int ($x_ndarray : R::NDArray::Int, $length : int);

seq

static method seq : R::NDArray::Int ($begin : int, $end : int, $by : int = 1);

undef

static method undef : R::NDArray::Int ();

sum

static method sum : R::NDArray::Int ($x_ndarray : R::NDArray::Int);

cumsum

static method cumsum : R::NDArray::Int ($x_ndarray : R::NDArray::Int);

prod

static method prod : R::NDArray::Int ($x_ndarray : R::NDArray::Int);

cumprod

static method cumprod : R::NDArray::Int ($x_ndarray : R::NDArray::Int);

diff

static method diff : R::NDArray::Int ($x_ndarray : R::NDArray::Int);

max

static method max : R::NDArray::Int ($x_ndarray : R::NDArray::Int);

min

static method min : R::NDArray::Int ($x_ndarray : R::NDArray::Int);

and

static method and : R::NDArray::Int ($x_ndarray : R::NDArray::Int, $y_ndarray : R::NDArray::Int);

or

static method or : R::NDArray::Int ($x_ndarray : R::NDArray::Int, $y_ndarray : R::NDArray::Int);

not

static method not : R::NDArray::Int ($x_ndarray : R::NDArray::Int);

See Also

Copyright & License

Copyright (c) 2024 Yuki Kimoto

MIT License