api / koma.extensions / get

get

operator funMatrix<Double>.get(i:Int, j:Int):Double operator funMatrix<Float>.get(i:Int, j:Int):Float operator fun <T>Matrix<T>.get(i:Int, j:Int):T operator funMatrix<Int>.get(i:Int, j:Int):Int @JvmName("getRangesByte") operator funNDArray<Byte>.get(vararg indices:IntRange):NDArray<Byte> operator funNDArray<Byte>.get(vararg indices:Int):Byte @JvmName("getRangesDouble") operator funNDArray<Double>.get(vararg indices:IntRange):NDArray<Double> operator funNDArray<Double>.get(vararg indices:Int):Double @JvmName("getRangesFloat") operator funNDArray<Float>.get(vararg indices:IntRange):NDArray<Float> operator funNDArray<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 funNDArray<Int>.get(vararg indices:IntRange):NDArray<Int> operator funNDArray<Int>.get(vararg indices:Int):Int @JvmName("getRangesLong") operator funNDArray<Long>.get(vararg indices:IntRange):NDArray<Long> operator funNDArray<Long>.get(vararg indices:Int):Long @JvmName("getRangesShort") operator funNDArray<Short>.get(vararg indices:IntRange):NDArray<Short> operator funNDArray<Short>.get(vararg indices:Int):Shortoperator funMatrix<Double>.get(i:Int):Double operator funMatrix<Float>.get(i:Int):Float operator fun <T>Matrix<T>.get(i:Int):T operator funMatrix<Int>.get(i:Int):Int

Gets the ith element in the matrix. If 2D, selects elements in row-major order.

@JvmName("getRangesDouble") operator funMatrix<Double>.get(rows:IntRange, cols:IntRange):Matrix<Double> @JvmName("getRangesFloat") operator funMatrix<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 funMatrix<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 funMatrix<Double>.get(rows:IntRange, cols:Int):Matrix<Double> @JvmName("setRowRangeFloat") operator funMatrix<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 funMatrix<Int>.get(rows:IntRange, cols:Int):Matrix<Int>

Allows for slicing of the rows and selection of a single column

@JvmName("getColRangeDouble") operator funMatrix<Double>.get(rows:Int, cols:IntRange):Matrix<Double> @JvmName("getColRangeFloat") operator funMatrix<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 funMatrix<Int>.get(rows:Int, cols:IntRange):Matrix<Int>

Allows for slicing of the cols and selection of a single row