Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DiscreteTuple

A tuple of Discrete Spaces.

A convenience class for sampling a tuple of Discrete spaces.

example
const discTuple = new DiscreteTuple([2,2,6]);
console.log(discTuple.toString());
> DiscreteTuple: [2, 2, 6]

const sample = discTuple.sample();
console.log(sample);
> [0,1,3]

Hierarchy

  • DiscreteTuple

Implements

Index

Constructors

constructor

  • Parameters

    • shape: number[]

      The shape of the tuple.

    Returns DiscreteTuple

Properties

length

length: number

sampleSpace

sampleSpace: Discrete[]

seedValue

seedValue: number

shape

shape: number[]

type

type: string

Methods

get

  • get(): tf.Tensor
  • Returns tf.Tensor

sample

  • sample(): number[]
  • Sample a random value from this Space.

    Returns number[]

    • A tuple of random samples.

seed

  • seed(seed: number): void
  • Parameters

    • seed: number

    Returns void

set

  • set(space: tf.Tensor): void
  • Parameters

    • space: tf.Tensor

    Returns void

setSampleSpace

  • setSampleSpace(value: any): void
  • Parameters

    • value: any

    Returns void

toString

  • toString(): string
  • Returns string

Generated using TypeDoc