DenseTernaryTensorArray

class DenseTernaryTensorArray(val shape: Shape, data: ByteArray, offset: Int = 0) : ItemsAccessor<Byte> (source)

Stores ternary data (-1, 0, 1) compactly using 2 bits per value.

Encoding scheme (2 bits per value):

  • 00 -> 0

  • 01 -> 1

  • 10 -> -1

  • 11 -> reserved (unused)

Constructors

Link copied to clipboard
constructor(shape: Shape, data: ByteArray, offset: Int = 0)
constructor(dimensions: List<Int>, data: ByteArray)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun get(vararg indices: Int): Byte

Retrieves an element at the specified multidimensional indices.

Link copied to clipboard
open operator override fun set(vararg indices: Int, value: Byte)

Setter