api / koma.extensions / get
get
operator fun
Matrix
<
Double
>.get(i:
Int
, j:
Int
):
Double
operator fun
Matrix
<
Float
>.get(i:
Int
, j:
Int
):
Float
operator fun <T>
Matrix
<
T
>.get(i:
Int
, j:
Int
):
T
operator fun
Matrix
<
Int
>.get(i:
Int
, j:
Int
):
Int
@JvmName("getRangesByte") operator fun
NDArray
<
Byte
>.get(vararg indices:
IntRange
):
NDArray
<
Byte
>
operator fun
NDArray
<
Byte
>.get(vararg indices:
Int
):
Byte
@JvmName("getRangesDouble") operator fun
NDArray
<
Double
>.get(vararg indices:
IntRange
):
NDArray
<
Double
>
operator fun
NDArray
<
Double
>.get(vararg indices:
Int
):
Double
@JvmName("getRangesFloat") operator fun
NDArray
<
Float
>.get(vararg indices:
IntRange
):
NDArray
<
Float
>
operator fun
NDArray
<
Float
>.get(vararg indices:
Int
):
Float
@JvmName("getRangesGeneric") operator fun <T>
NDArray
<
T
>.get(vararg indices:
IntRange
):
NDArray
<
T
>
operator fun <T>
NDArray
<
T
>.get(vararg indices:
Int
):
T
@JvmName("getRangesInt") operator fun
NDArray
<
Int
>.get(vararg indices:
IntRange
):
NDArray
<
Int
>
operator fun
NDArray
<
Int
>.get(vararg indices:
Int
):
Int
@JvmName("getRangesLong") operator fun
NDArray
<
Long
>.get(vararg indices:
IntRange
):
NDArray
<
Long
>
operator fun
NDArray
<
Long
>.get(vararg indices:
Int
):
Long
@JvmName("getRangesShort") operator fun
NDArray
<
Short
>.get(vararg indices:
IntRange
):
NDArray
<
Short
>
operator fun
NDArray
<
Short
>.get(vararg indices:
Int
):
Short
operator fun
Matrix
<
Double
>.get(i:
Int
):
Double
operator fun
Matrix
<
Float
>.get(i:
Int
):
Float
operator fun <T>
Matrix
<
T
>.get(i:
Int
):
T
operator fun
Matrix
<
Int
>.get(i:
Int
):
Int
Gets the ith element in the matrix. If 2D, selects elements in row-major order.
@JvmName("getRangesDouble") operator fun
Matrix
<
Double
>.get(rows:
IntRange
, cols:
IntRange
):
Matrix
<
Double
>
@JvmName("getRangesFloat") operator fun
Matrix
<
Float
>.get(rows:
IntRange
, cols:
IntRange
):
Matrix
<
Float
>
@JvmName("getRangesGeneric") operator fun <T>
Matrix
<
T
>.get(rows:
IntRange
, cols:
IntRange
):
Matrix
<
T
>
@JvmName("getRangesInt") operator fun
Matrix
<
Int
>.get(rows:
IntRange
, cols:
IntRange
):
Matrix
<
Int
>
Allow slicing, e.g. matrix[1..2, 3..4]
. Note that the range 1..2 is inclusive, so
it will retrieve row 1 and 2. Use 1.until(2) for a non-inclusive range.
@param rows the set of rows to select @param cols the set of columns to select
@return a new matrix containing the submatrix.
@JvmName("setRowRangeDouble") operator fun
Matrix
<
Double
>.get(rows:
IntRange
, cols:
Int
):
Matrix
<
Double
>
@JvmName("setRowRangeFloat") operator fun
Matrix
<
Float
>.get(rows:
IntRange
, cols:
Int
):
Matrix
<
Float
>
@JvmName("setRowRangeGeneric") operator fun <T>
Matrix
<
T
>.get(rows:
IntRange
, cols:
Int
):
Matrix
<
T
>
@JvmName("setRowRangeInt") operator fun
Matrix
<
Int
>.get(rows:
IntRange
, cols:
Int
):
Matrix
<
Int
>
Allows for slicing of the rows and selection of a single column
@JvmName("getColRangeDouble") operator fun
Matrix
<
Double
>.get(rows:
Int
, cols:
IntRange
):
Matrix
<
Double
>
@JvmName("getColRangeFloat") operator fun
Matrix
<
Float
>.get(rows:
Int
, cols:
IntRange
):
Matrix
<
Float
>
@JvmName("getColRangeGeneric") operator fun <T>
Matrix
<
T
>.get(rows:
Int
, cols:
IntRange
):
Matrix
<
T
>
@JvmName("getColRangeInt") operator fun
Matrix
<
Int
>.get(rows:
Int
, cols:
IntRange
):
Matrix
<
Int
>
Allows for slicing of the cols and selection of a single row