Name

SPVM::R::OP::Time::Piece - N-Dimensional Array Operations for R::NDArray::Time::Piece

Description

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

Usage

use R::OP::Time::Piece as TPOP;

my $data = [
  Time::Piece->strptime("2024-01-01 00-00-00", '%Y-%m-%d %H:%M:%S'),
  Time::Piece->strptime("2024-01-02 00-00-00", '%Y-%m-%d %H:%M:%S'),
  Time::Piece->strptime("2024-01-03 00-00-00", '%Y-%m-%d %H:%M:%S'),
  Time::Piece->strptime("2024-01-04 00-00-00", '%Y-%m-%d %H:%M:%S'),
  Time::Piece->strptime("2024-01-05 00-00-00", '%Y-%m-%d %H:%M:%S'),
  Time::Piece->strptime("2024-01-06 00-00-00", '%Y-%m-%d %H:%M:%S'),
];

my $ndarray_scalar = TPOP->c(Time::Piece->strptime("2024-01-01 00-00-00", '%Y-%m-%d %H:%M:%S'));

my $ndarray_vector = TPOP->c($data);

my $ndarray = TPOP->c($data, [3, 2]);

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

Class Methods

c

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

eq

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

ne

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

gt

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

ge

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

lt

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

le

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

rep

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

rep_length

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

See Also

Copyright & License

Copyright (c) 2024 Yuki Kimoto

MIT License