Creates a new L<R::NDArray::FloatComplex|SPVM::R::NDArray::FloatComplex> object that represents a matrix giventhe data $data, the row numers $nrow, and the column numbers $ncol, and returns the new object.
This method calls L<R::OP::FloatComplex#c|SPVM::R::OP::FloatComplex/"c"> method.
Creates a L<R::NDArray::FloatComplex|SPVM::R::NDArray::FloatComplex> object that represents a diagonal matrix givena n-dimensional array $x_ndarraythat is a vector withdiagonal values, and returns the new object.
The row numbers and column numbers of the new object is equal to the value of C<length> field of $x_ndarray.
Exceptions:
The n-dimensional array $x_ndarraymust be defined. Otherwise, an exception is thrown.
The n-dimensional array $x_ndarraymust be a vector. Otherwise, an exception is thrown.
Creates a new L<R::NDArray::FloatComplex|SPVM::R::NDArray::FloatComplex>, sets its data to the diagonal valuesof the n-dimension array $x_ndarraythat is a matrix, and returns the new object.
The value of C<length> field of the new object is equal to the row numbers of $x_ndarray.
Exceptions:
The n-dimensional array $x_ndarraymust be defined. Otherwise, an exception is thrown.
The n-dimensional array $x_ndarraymust be a matrix. Otherwise, an exception is thrown.
Creates a new L<R::NDArray::FloatComplex|SPVM::R::NDArray::FloatComplex> object that represets an identity matrix giventhe row numbers $nrow, and returns the new object.
Exceptions:
The row numbers $nrowmust be greater than 0. Otherwise, an exception is thrown.
=head2 mul
C<static method mul : L<R::NDArray::FloatComplex|SPVM::R::NDArray::FloatComplex> ($x_ndarray: L<R::NDArray::FloatComplex|SPVM::R::NDArray::FloatComplex>, $y_ndarray: L<R::NDArray::FloatComplex|SPVM::R::NDArray::FloatComplex>);>
Performs a matrix multiplication on the n-dimension array $x_ndarraythat is a matrix and the n-dimension array $y_ndarraythat is a matrix.
And creates a new L<R::NDArray::FloatComplex|SPVM::R::NDArray::FloatComplex> object withthe result, and returns the new object.
Exceptions:
The n-dimensional array $x_ndarraymust be defined. Otherwise, an exception is thrown.
The n-dimensional array $x_ndarraymust be a matrix. Otherwise, an exception is thrown.
The n-dimensional array $y_ndarraymust be defined. Otherwise, an exception is thrown.
The n-dimensional array $y_ndarraymust be a matrix. Otherwise, an exception is thrown.
The column numbers of the matrix $x_ndarraymust be equal to the row numbers of the matrix $y_ndarray. Otherwise, an exception is thrown.
=head2 t
C<static method t : L<R::NDArray::FloatComplex|SPVM::R::NDArray::FloatComplex> ($x_ndarray: L<R::NDArray::FloatComplex|SPVM::R::NDArray::FloatComplex>);>
Performs a matrix transpose on the n-dimension array $x_ndarraythat is a matrix, creates a new L<R::NDArray::FloatComplex|SPVM::R::NDArray::FloatComplex> object withthe result, and returns the new object.
Excetpions:
The n-dimensional array $x_ndarraymust be defined. Otherwise, an exception is thrown.
The n-dimensional array $x_ndarraymust be a matrix. Otherwise, an exception is thrown.
=head2 det
C<static method det : L<R::NDArray::FloatComplex|SPVM::R::NDArray::FloatComplex> ($x_ndarray: L<R::NDArray::FloatComplex|SPVM::R::NDArray::FloatComplex>);>
Calculates the determinant of the n-dimension array $x_ndarraythat is a matrix, creates a new L<R::NDArray::FloatComplex|SPVM::R::NDArray::FloatComplex> object withthe result, and returns the new object.
The new object is a scalar.
Exceptions:
The n-dimensional array $x_ndarraymust be defined. Otherwise, an exception is thrown.
The n-dimensional array $x_ndarraymust be a square matrix. Otherwise, an exception is thrown.
Calculates the inverse of the n-dimension array $x_ndarraythat is a matrix, creates a new L<R::NDArray::FloatComplex|SPVM::R::NDArray::FloatComplex> object withthe result, and returns the new object.
Exceptions:
The n-dimensional array $x_ndarraymust be defined. Otherwise, an exception is thrown.
The n-dimensional array $x_ndarraymust be a square matrix. Otherwise, an exception is thrown.
The determinant of the n-dimensional array $x_ndarraythat is a matrix must not be equal to 0. Otherwise, an exception is thrown.
=head2 eigen
C<static method eigen : L<R::NDArray::Hash|SPVM::R::NDArray::Hash> ($x_ndarray: L<R::NDArray::FloatComplex|SPVM::R::NDArray::FloatComplex>);>
Finds the eigenvectors and eigenvalues of the n-dimension array $x_ndarraythat is a matrix, and creates a new two L<R::NDArray::FloatComplex|SPVM::R::NDArray::FloatComplex> object foreachresults.
And creates a new L<R::NDArray::Hash|SPVM::R::NDArray::Hash> object, sets the value of key C<"vectors"> to the new object that hasthe eigenvectors, sets the value of key C<"values"> to the new object that hasthe eigenvalues. Note that these vectores and valuesare complex numbers even ifthe result is able to be represented by real numbers.
And returns the new L<R::NDArray::Hash|SPVM::R::NDArray::Hash>.
Exceptions:
The n-dimensional array $x_ndarraymust be defined. Otherwise, an exception is thrown.
The n-dimensional array $x_ndarraymust be a square matrix. Otherwise, an exception is thrown.