Package org.flag4j.core.dense_base
Interface DenseMatrixMixin<T,X>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Computes the element-wise addition of a matrix with a real dense matrix.void
Computes the element-wise addition of a matrix with a real sparse matrix.setSliceCopy
(double[][] values, int rowStart, int colStart) Creates a copy of this matrix and sets a slice of the copy to the specified values.setSliceCopy
(int[][] values, int rowStart, int colStart) Creates a copy of this matrix and sets a slice of the copy to the specified values.setSliceCopy
(Double[][] values, int rowStart, int colStart) Creates a copy of this matrix and sets a slice of the copy to the specified values.setSliceCopy
(Integer[][] values, int rowStart, int colStart) Creates a copy of this matrix and sets a slice of the copy to the specified values.setSliceCopy
(Matrix values, int rowStart, int colStart) Creates a copy of this matrix and sets a slice of the copy to the specified values.setSliceCopy
(CooMatrix values, int rowStart, int colStart) Creates a copy of this matrix and sets a slice of the copy to the specified values.setSliceCopy
(T values, int rowStart, int colStart) Creates a copy of this matrix and sets a slice of the copy to the specified values.setSliceCopy
(X[][] values, int rowStart, int colStart) Creates a copy of this matrix and sets a slice of the copy to the specified values.setValues
(double[][] values) Sets the value of this matrix using a 2D array.setValues
(int[][] values) Sets the value of this matrix using a 2D array.Sets the value of this matrix using a 2D array.Sets the value of this matrix using a 2D array.void
Computes the element-wise subtraction of this matrix with a real dense matrix.void
Computes the element-wise subtraction of this matrix with a real sparse matrix.
-
Method Details
-
setValues
Sets the value of this matrix using a 2D array.- Parameters:
values
- New values of the matrix.- Returns:
- A reference to this matrix.
- Throws:
IllegalArgumentException
- If the values array has a different shape then this matrix.
-
setValues
Sets the value of this matrix using a 2D array.- Parameters:
values
- New values of the matrix.- Returns:
- A reference to this matrix.
- Throws:
IllegalArgumentException
- If the values array has a different shape then this matrix.
-
setValues
Sets the value of this matrix using a 2D array.- Parameters:
values
- New values of the matrix.- Returns:
- A reference to this matrix.
- Throws:
IllegalArgumentException
- If the values array has a different shape then this matrix.
-
setValues
Sets the value of this matrix using a 2D array.- Parameters:
values
- New values of the matrix.- Returns:
- A reference to this matrix.
- Throws:
IllegalArgumentException
- If the values array has a different shape then this matrix.
-
addEq
Computes the element-wise addition of a matrix with a real dense matrix. The result is stored in this matrix.- Parameters:
B
- The matrix to add to this matrix.
-
subEq
Computes the element-wise subtraction of this matrix with a real dense matrix. The result is stored in this matrix.- Parameters:
B
- The matrix to subtract from this matrix.
-
addEq
Computes the element-wise addition of a matrix with a real sparse matrix. The result is stored in this matrix.- Parameters:
B
- The sparse matrix to add to this matrix.
-
subEq
Computes the element-wise subtraction of this matrix with a real sparse matrix. The result is stored in this matrix.- Parameters:
B
- The sparse matrix to subtract from this matrix.
-
setSliceCopy
Creates a copy of this matrix and sets a slice of the copy to the specified values. The rowStart and colStart parameters specify the upper left index location of the slice to set.- Parameters:
values
- New values for the specified slice.rowStart
- Starting row index for the slice (inclusive).colStart
- Starting column index for the slice (inclusive).- Returns:
- A copy of this matrix with the given slice set to the specified values.
- Throws:
IndexOutOfBoundsException
- If rowStart or colStart are not within the matrix.IllegalArgumentException
- If the values slice, with upper left corner at the specified location, does not fit completely within this matrix.
-
setSliceCopy
Creates a copy of this matrix and sets a slice of the copy to the specified values. The rowStart and colStart parameters specify the upper left index location of the slice to set.- Parameters:
values
- New values for the specified slice.rowStart
- Starting row index for the slice (inclusive).colStart
- Starting column index for the slice (inclusive).- Returns:
- A copy of this matrix with the given slice set to the specified values.
- Throws:
IndexOutOfBoundsException
- If rowStart or colStart are not within the matrix.IllegalArgumentException
- If the values slice, with upper left corner at the specified location, does not fit completely within this matrix.
-
setSliceCopy
Creates a copy of this matrix and sets a slice of the copy to the specified values. The rowStart and colStart parameters specify the upper left index location of the slice to set.- Parameters:
values
- New values for the specified slice.rowStart
- Starting row index for the slice (inclusive).colStart
- Starting column index for the slice (inclusive).- Returns:
- A copy of this matrix with the given slice set to the specified values.
- Throws:
IndexOutOfBoundsException
- If rowStart or colStart are not within the matrix.IllegalArgumentException
- If the values slice, with upper left corner at the specified location, does not fit completely within this matrix.
-
setSliceCopy
Creates a copy of this matrix and sets a slice of the copy to the specified values. The rowStart and colStart parameters specify the upper left index location of the slice to set.- Parameters:
values
- New values for the specified slice.rowStart
- Starting row index for the slice (inclusive).colStart
- Starting column index for the slice (inclusive).- Returns:
- A copy of this matrix with the given slice set to the specified values.
- Throws:
IndexOutOfBoundsException
- If rowStart or colStart are not within the matrix.IllegalArgumentException
- If the values slice, with upper left corner at the specified location, does not fit completely within this matrix.
-
setSliceCopy
Creates a copy of this matrix and sets a slice of the copy to the specified values. The rowStart and colStart parameters specify the upper left index location of the slice to set.- Parameters:
values
- New values for the specified slice.rowStart
- Starting row index for the slice (inclusive).colStart
- Starting column index for the slice (inclusive).- Returns:
- A copy of this matrix with the given slice set to the specified values.
- Throws:
IndexOutOfBoundsException
- If rowStart or colStart are not within the matrix.IllegalArgumentException
- If the values slice, with upper left corner at the specified location, does not fit completely within this matrix.
-
setSliceCopy
Creates a copy of this matrix and sets a slice of the copy to the specified values. The rowStart and colStart parameters specify the upper left index location of the slice to set.- Parameters:
values
- New values for the specified slice.rowStart
- Starting row index for the slice (inclusive).colStart
- Starting column index for the slice (inclusive).- Returns:
- A copy of this matrix with the given slice set to the specified values.
- Throws:
IndexOutOfBoundsException
- If rowStart or colStart are not within the matrix.IllegalArgumentException
- If the values slice, with upper left corner at the specified location, does not fit completely within this matrix.
-
setSliceCopy
Creates a copy of this matrix and sets a slice of the copy to the specified values. The rowStart and colStart parameters specify the upper left index location of the slice to set.- Parameters:
values
- New values for the specified slice.rowStart
- Starting row index for the slice (inclusive).colStart
- Starting column index for the slice (inclusive).- Returns:
- A copy of this matrix with the given slice set to the specified values.
- Throws:
IndexOutOfBoundsException
- If rowStart or colStart are not within the matrix.IllegalArgumentException
- If the values slice, with upper left corner at the specified location, does not fit completely within this matrix.
-
setSliceCopy
Creates a copy of this matrix and sets a slice of the copy to the specified values. The rowStart and colStart parameters specify the upper left index location of the slice to set.- Parameters:
values
- New values for the specified slice.rowStart
- Starting row index for the slice (inclusive).colStart
- Starting column index for the slice (inclusive).- Returns:
- A copy of this matrix with the given slice set to the specified values.
- Throws:
IndexOutOfBoundsException
- If rowStart or colStart are not within the matrix.IllegalArgumentException
- If the values slice, with upper left corner at the specified location, does not fit completely within this matrix.
-