C<static method c : L<R::NDArray::StringBuffer|SPVM::R::NDArray::StringBuffer> ($data: object of StringBuffer|StringBuffer[]|L<R::NDArray::StringBuffer|SPVM::R::NDArray::StringBuffer>|string|string[]|L<R::NDArray::String|SPVM::R::NDArray::String>, $dim: int[] = undef);>
Creates a new L<R::NDArray::StringBuffer|SPVM::R::NDArray::StringBuffer> object giventhe data $dataand the dimensions $dim.
Implemetation:
If $datais definedand the type of $datais L<StringBuffer|SPVM::StringBuffer>, $datais set to C<[(StringBuffer)$data]>.
If $datais definedand the type of $datais L<R::NDArray::StringBuffer|SPVM::R::NDArray::StringBuffer>, $dimis set to C<$data-E<gt>(R::NDArray::StringBuffer)-E<gt>dim> unless$dimis definedand $datais set to C<$data-E<gt>(R::NDArray::StringBuffer)-E<gt>data>.
If $datais definedand the type of $datais C<string>, $datais set to C<[StringBuffer-E<gt>new((string)$data)]>.
If $datais definedand the type of $datais C<string[]>, $datais set to the returnvalue of C<R::OP::String->c((string[])$data)->to_string_buffer_ndarray->data>.
If $datais definedand the type of $datais L<R::NDArray::String|SPVM::R::NDArray::String>, $dimis set to C<$data-E<gt>(R::NDArray::String)-E<gt>dim> unless$dimis definedand $datais set to C<$data-E<gt>(R::NDArray::String)-E<gt>to_string_buffer_ndarray-E<gt>data>.
And this method calls L<R::NDArray::StringBuffer#new|SPVM::R::NDArray::StringBuffer/"new"> method given $dim and $data.
Exceptions:
The type of the data $datamust be StringBuffer, StringBuffer[], R::NDArray::StringBuffer, string, string[], R::NDArray::String ifdefined. Othrewise, an exception is thrown.
Performs C<$x_elem-E<gt>L<push|SPVM::StringBuffer/"push">($y_elem)> method on eachelement(named $x_elem, $y_elem) of the n-dimensional array $x_ndarrayand $y_ndarray, and sets eachelement of the new n-dimensional array to the eachoperation result, and returns the new n-dimensional array.
$y_ndarrayallows to be a L<scalar|SPVM::R::NDArray/"Scalar">. In that case, eachelement used in the operation is the element at index0.
If C<push> method throw an exceptions, $x_elemis unchanged.
Exceptions:
The n-dimensional array $x_ndarraymust be defined. Otherwise, an exception is thrown.
The n-dimensional array $y_ndarraymust be defined. Otherwise, an exception is thrown.
The dimensions of $x_ndarraymust be equal to the dimensions of $y_ndarrayif$y_ndarrayis not a scalar. Otherwise, an exception is thrown.
Creates a new L<R::NDArray::Int|SPVM::R::NDArray::Int> object of the same dimensions as the n-dimensional array $x_ndarrayfora returnvalue, performs the comparison logic C<$x_ndarray-E<gt>L<elem_cmp|SPVM::R::NDArray::StringBuffer/"elem_cmp">($x_ndarray-E<gt>data, $i, $y_ndarray-E<gt>data, $i) == 0> on the eachelement(the indexis $i) of the n-dimensional array $x_ndarrayand $y_ndarray, and sets eachelement of the new n-dimensional array to the eachoperation result, and returns the new n-dimensional array.
Exceptions:
The n-dimensional array $x_ndarraymust be defined. Otherwise, an exception is thrown.
The n-dimensional array $y_ndarraymust be defined. Otherwise, an exception is thrown.
The dimensions of $x_ndarraymust be equal to the dimensions of $y_ndarray. Otherwise, an exception is thrown.
=head2 ne
C<static method ne : L<R::NDArray::Int|SPVM::R::NDArray::Int> ($x_ndarray: L<R::NDArray::StringBuffer|SPVM::R::NDArray::StringBuffer>, $y_ndarray: L<R::NDArray::StringBuffer|SPVM::R::NDArray::StringBuffer>);>
Creates a new L<R::NDArray::Int|SPVM::R::NDArray::Int> object of the same dimensions as the n-dimensional array $x_ndarrayfora returnvalue, performs the comparison logic C<$x_ndarray-E<gt>L<elem_cmp|SPVM::R::NDArray::StringBuffer/"elem_cmp">($x_ndarray-E<gt>data, $i, $y_ndarray-E<gt>data, $i) != 0> on the eachelement(the indexis $i) of the n-dimensional array $x_ndarrayand $y_ndarray, and sets eachelement of the new n-dimensional array to the eachoperation result, and returns the new n-dimensional array.
Exceptions:
The n-dimensional array $x_ndarraymust be defined. Otherwise, an exception is thrown.
The n-dimensional array $y_ndarraymust be defined. Otherwise, an exception is thrown.
The dimensions of $x_ndarraymust be equal to the dimensions of $y_ndarray. Otherwise, an exception is thrown.
Creates a new L<R::NDArray::Int|SPVM::R::NDArray::Int> object of the same dimensions as the n-dimensional array $x_ndarrayfora returnvalue, performs the comparison logic C<$x_ndarray-E<gt>L<elem_cmp|SPVM::R::NDArray::StringBuffer/"elem_cmp">($x_ndarray-E<gt>data, $i, $y_ndarray-E<gt>data, $i) E<gt> 0> on the eachelement(the indexis $i) of the n-dimensional array $x_ndarrayand $y_ndarray, and sets eachelement of the new n-dimensional array to the eachoperation result, and returns the new n-dimensional array.
Exceptions:
The n-dimensional array $x_ndarraymust be defined. Otherwise, an exception is thrown.
The n-dimensional array $y_ndarraymust be defined. Otherwise, an exception is thrown.
The dimensions of $x_ndarraymust be equal to the dimensions of $y_ndarray. Otherwise, an exception is thrown.
=head2 ge
C<static method ge : L<R::NDArray::Int|SPVM::R::NDArray::Int> ($x_ndarray: L<R::NDArray::StringBuffer|SPVM::R::NDArray::StringBuffer>, $y_ndarray: L<R::NDArray::StringBuffer|SPVM::R::NDArray::StringBuffer>);>
Creates a new L<R::NDArray::Int|SPVM::R::NDArray::Int> object of the same dimensions as the n-dimensional array $x_ndarrayfora returnvalue, performs the comparison logic C<$x_ndarray-E<gt>L<elem_cmp|SPVM::R::NDArray::StringBuffer/"elem_cmp">($x_ndarray-E<gt>data, $i, $y_ndarray-E<gt>data, $i) E<gt>= 0> on the eachelement(the indexis $i) of the n-dimensional array $x_ndarrayand $y_ndarray, and sets eachelement of the new n-dimensional array to the eachoperation result, and returns the new n-dimensional array.
Exceptions:
The n-dimensional array $x_ndarraymust be defined. Otherwise, an exception is thrown.
The n-dimensional array $y_ndarraymust be defined. Otherwise, an exception is thrown.
The dimensions of $x_ndarraymust be equal to the dimensions of $y_ndarray. Otherwise, an exception is thrown.
Creates a new L<R::NDArray::Int|SPVM::R::NDArray::Int> object of the same dimensions as the n-dimensional array $x_ndarrayfora returnvalue, performs the comparison logic C<$x_ndarray-E<gt>L<elem_cmp|SPVM::R::NDArray::StringBuffer/"elem_cmp">($x_ndarray-E<gt>data, $i, $y_ndarray-E<gt>data, $i) E<lt> 0> on the eachelement(the indexis $i) of the n-dimensional array $x_ndarrayand $y_ndarray, and sets eachelement of the new n-dimensional array to the eachoperation result, and returns the new n-dimensional array.
Exceptions:
The n-dimensional array $x_ndarraymust be defined. Otherwise, an exception is thrown.
The n-dimensional array $y_ndarraymust be defined. Otherwise, an exception is thrown.
The dimensions of $x_ndarraymust be equal to the dimensions of $y_ndarray. Otherwise, an exception is thrown.
=head2 le
C<static method le : L<R::NDArray::Int|SPVM::R::NDArray::Int> ($x_ndarray: L<R::NDArray::StringBuffer|SPVM::R::NDArray::StringBuffer>, $y_ndarray: L<R::NDArray::StringBuffer|SPVM::R::NDArray::StringBuffer>);>
Creates a new L<R::NDArray::Int|SPVM::R::NDArray::Int> object of the same dimensions as the n-dimensional array $x_ndarrayfora returnvalue, performs the comparison logic C<$x_ndarray-E<gt>L<elem_cmp|SPVM::R::NDArray::StringBuffer/"elem_cmp">($x_ndarray-E<gt>data, $i, $y_ndarray-E<gt>data, $i) E<lt>= 0> on the eachelement(the indexis $i) of the n-dimensional array $x_ndarrayand $y_ndarray, and sets eachelement of the new n-dimensional array to the eachoperation result, and returns the new n-dimensional array.
Exceptions:
The n-dimensional array $x_ndarraymust be defined. Otherwise, an exception is thrown.
The n-dimensional array $y_ndarraymust be defined. Otherwise, an exception is thrown.
The dimensions of $x_ndarraymust be equal to the dimensions of $y_ndarray. Otherwise, an exception is thrown.