Struct rgsl::types::matrix_complex::MatrixComplexF32 [−][src]
pub struct MatrixComplexF32 { /* fields omitted */ }
Methods
impl MatrixComplexF32
[src]
impl MatrixComplexF32
pub fn new(n1: usize, n2: usize) -> Option<MatrixComplexF32>
[src]
pub fn new(n1: usize, n2: usize) -> Option<MatrixComplexF32>
Creates a new MatrixF64 with all elements set to zero
Example with n1 = 2 and n2 = 3 :
XX XX XX
XX XX XX
pub fn get(&self, y: usize, x: usize) -> ComplexF32
[src]
pub fn get(&self, y: usize, x: usize) -> ComplexF32
This function returns the (i,j)-th element of the matrix. If y or x lie outside the allowed range of 0 to n1-1 and 0 to n2-1 then the error handler is invoked and 0 is returned.
pub fn set(
&mut self,
y: usize,
x: usize,
value: &ComplexF32
) -> &MatrixComplexF32
[src]
pub fn set(
&mut self,
y: usize,
x: usize,
value: &ComplexF32
) -> &MatrixComplexF32
This function sets the value of the (i,j)-th element of the matrix to value. If y or x lies outside the allowed range of 0 to n1-1 and 0 to n2-1 then the error handler is invoked.
pub fn set_all(&mut self, x: &ComplexF32) -> &MatrixComplexF32
[src]
pub fn set_all(&mut self, x: &ComplexF32) -> &MatrixComplexF32
This function sets all the elements of the matrix to the value x.
pub fn set_zero(&mut self) -> &MatrixComplexF32
[src]
pub fn set_zero(&mut self) -> &MatrixComplexF32
This function sets all the elements of the matrix to zero.
pub fn set_identity(&mut self) -> &MatrixComplexF32
[src]
pub fn set_identity(&mut self) -> &MatrixComplexF32
This function sets the elements of the matrix to the corresponding elements of the identity matrix, m(i,j) = \delta(i,j), i.e. a unit diagonal with all off-diagonal elements zero. This applies to both square and rectangular matrices.
pub fn copy_from(&mut self, other: &MatrixComplexF32) -> Value
[src]
pub fn copy_from(&mut self, other: &MatrixComplexF32) -> Value
This function copies the elements of the other matrix into the self matrix. The two matrices must have the same size.
pub fn copy_to(&self, other: &mut MatrixComplexF32) -> Value
[src]
pub fn copy_to(&self, other: &mut MatrixComplexF32) -> Value
This function copies the elements of the self matrix into the other matrix. The two matrices must have the same size.
pub fn swap(&mut self, other: &mut MatrixComplexF32) -> Value
[src]
pub fn swap(&mut self, other: &mut MatrixComplexF32) -> Value
This function exchanges the elements of the matrices self and other by copying. The two matrices must have the same size.
pub fn get_row(&self, y: usize) -> Option<(VectorComplexF32, Value)>
[src]
pub fn get_row(&self, y: usize) -> Option<(VectorComplexF32, Value)>
This function copies the elements of the y-th row of the matrix into the returned vector.
pub fn get_col(&self, x: usize) -> Option<(VectorComplexF32, Value)>
[src]
pub fn get_col(&self, x: usize) -> Option<(VectorComplexF32, Value)>
This function copies the elements of the x-th column of the matrix into the returned vector.
pub fn set_row(&mut self, y: usize, v: &VectorComplexF32) -> Value
[src]
pub fn set_row(&mut self, y: usize, v: &VectorComplexF32) -> Value
This function copies the elements of the vector v into the y-th row of the matrix. The length of the vector must be the same as the length of the row.
pub fn set_col(&mut self, x: usize, v: &VectorComplexF32) -> Value
[src]
pub fn set_col(&mut self, x: usize, v: &VectorComplexF32) -> Value
This function copies the elements of the vector v into the x-th column of the matrix. The length of the vector must be the same as the length of the column.
pub fn swap_rows(&self, y1: usize, y2: usize) -> Value
[src]
pub fn swap_rows(&self, y1: usize, y2: usize) -> Value
This function exchanges the y1-th and y2-th rows of the matrix in-place.
pub fn swap_columns(&mut self, x1: usize, x2: usize) -> Value
[src]
pub fn swap_columns(&mut self, x1: usize, x2: usize) -> Value
This function exchanges the x1-th and x2-th columns of the matrix in-place.
pub fn swap_row_col(&mut self, i: usize, j: usize) -> Value
[src]
pub fn swap_row_col(&mut self, i: usize, j: usize) -> Value
This function exchanges the i-th row and j-th column of the matrix in-place. The matrix must be square for this operation to be possible.
pub fn transpose_memcpy(&self) -> Option<(MatrixComplexF32, Value)>
[src]
pub fn transpose_memcpy(&self) -> Option<(MatrixComplexF32, Value)>
This function returns the transpose of the matrix by copying the elements into it. This function works for all matrices provided that the dimensions of the matrix dest match the transposed dimensions of the matrix.
pub fn transpose(&mut self) -> Value
[src]
pub fn transpose(&mut self) -> Value
This function replaces the matrix m by its transpose by copying the elements of the matrix in-place. The matrix must be square for this operation to be possible.
pub fn add(&mut self, other: &MatrixComplexF32) -> Value
[src]
pub fn add(&mut self, other: &MatrixComplexF32) -> Value
This function adds the elements of the other matrix to the elements of the self matrix. The result self(i,j) <- self(i,j) + other(i,j) is stored in self and other remains unchanged. The two matrices must have the same dimensions.
pub fn sub(&mut self, other: &MatrixComplexF32) -> Value
[src]
pub fn sub(&mut self, other: &MatrixComplexF32) -> Value
This function subtracts the elements of the other matrix from the elements of the self matrix. The result self(i,j) <- self(i,j) - other(i,j) is stored in self and other remains unchanged. The two matrices must have the same dimensions.
pub fn mul_elements(&mut self, other: &MatrixComplexF32) -> Value
[src]
pub fn mul_elements(&mut self, other: &MatrixComplexF32) -> Value
This function multiplies the elements of the self matrix by the elements of the other matrix. The result self(i,j) <- self(i,j) * other(i,j) is stored in self and other remains unchanged. The two matrices must have the same dimensions.
pub fn div_elements(&mut self, other: &MatrixComplexF32) -> Value
[src]
pub fn div_elements(&mut self, other: &MatrixComplexF32) -> Value
This function divides the elements of the self matrix by the elements of the other matrix. The result self(i,j) <- self(i,j) / other(i,j) is stored in self and other remains unchanged. The two matrices must have the same dimensions.
pub fn scale(&mut self, x: &ComplexF32) -> Value
[src]
pub fn scale(&mut self, x: &ComplexF32) -> Value
This function multiplies the elements of the self matrix by the constant factor x. The result self(i,j) <- x self(i,j) is stored in self.
pub fn add_constant(&mut self, x: &ComplexF32) -> Value
[src]
pub fn add_constant(&mut self, x: &ComplexF32) -> Value
This function adds the constant value x to the elements of the self matrix. The result self(i,j) <- self(i,j) + x is stored in self.
pub fn is_null(&self) -> bool
[src]
pub fn is_null(&self) -> bool
This function returns true if all the elements of the self matrix are stricly zero.
pub fn is_pos(&self) -> bool
[src]
pub fn is_pos(&self) -> bool
This function returns true if all the elements of the self matrix are stricly positive.
pub fn is_neg(&self) -> bool
[src]
pub fn is_neg(&self) -> bool
This function returns true if all the elements of the self matrix are stricly negative.
pub fn is_non_neg(&self) -> bool
[src]
pub fn is_non_neg(&self) -> bool
This function returns true if all the elements of the self matrix are stricly non-negative.
pub fn equal(&self, other: &MatrixComplexF32) -> bool
[src]
pub fn equal(&self, other: &MatrixComplexF32) -> bool
This function returns true if all elements of the two matrix are equal.
pub fn clone(&self) -> Option<MatrixComplexF32>
[src]
pub fn clone(&self) -> Option<MatrixComplexF32>
Trait Implementations
impl Drop for MatrixComplexF32
[src]
impl Drop for MatrixComplexF32
impl Debug for MatrixComplexF32
[src]
impl Debug for MatrixComplexF32
Auto Trait Implementations
impl !Send for MatrixComplexF32
impl !Send for MatrixComplexF32
impl !Sync for MatrixComplexF32
impl !Sync for MatrixComplexF32