Package space.kscience.kmath.tensors.core

Types

Link copied to clipboard

Basic linear algebra operations implemented with broadcasting. For more information: https://pytorch.org/docs/stable/notes/broadcasting.html

Link copied to clipboard
open class BufferedTensor<T> : MutableStructureND<T>

Represents Tensor over a MutableBuffer intended to be used through DoubleTensor and IntTensor

Link copied to clipboard
class DoubleTensor : BufferedTensor<Double>

Default BufferedTensor implementation for Double values

Link copied to clipboard

Implementation of basic operations over double tensors and basic algebra operations on them.

Link copied to clipboard
class IntTensor : BufferedTensor<Int>

Default BufferedTensor implementation for Int values

Link copied to clipboard
class TensorLinearStructure(shape: IntArray) : Strides

This Strides implementation follows the last dimension first convention For more information: https://numpy.org/doc/stable/reference/generated/numpy.ndarray.strides.html

Functions

Link copied to clipboard
fun DoubleTensor.copyArray(): DoubleArray

Returns a copy-protected DoubleArray of tensor elements

fun IntTensor.copyArray(): IntArray

Returns a copy-protected IntArray of tensor elements

Link copied to clipboard
@JvmName(name = "varArgOne")
fun DoubleTensorAlgebra.one(vararg shape: Int): DoubleTensor
fun DoubleTensorAlgebra.one(shape: Shape): DoubleTensor
Link copied to clipboard
fun Tensor<Double>.toDoubleTensor(): DoubleTensor
Link copied to clipboard
fun Tensor<Int>.toIntTensor(): IntTensor

Casts Tensor of Int to IntTensor

Link copied to clipboard

Compute a value using broadcast double tensor algebra

Link copied to clipboard
@JvmName(name = "varArgZero")
fun DoubleTensorAlgebra.zero(vararg shape: Int): DoubleTensor
fun DoubleTensorAlgebra.zero(shape: Shape): DoubleTensor

Properties

Link copied to clipboard
Link copied to clipboard