This reference describes unreleased code on main; no release documents it yet.

rlmesh::spaces::Box

structPreviewuse rlmesh::spaces::Box;[source]

A box of numbers in [low, high].

struct Box(/* private field */)

from_spec

associated function[source]
fn from_spec(spec: SpaceSpec) -> Result<Self>

A space for spec; a spec of another kind is the ValueError class.

new

associated function[source]
fn new(
    low: impl Into<Bound>,
    high: impl Into<Bound>,
    shape: impl Into<Vec<i64>>,
    options: BoxOptions,
) -> Result<Box>

Box(low, high, shape, dtype).

(-inf, inf) is unbounded for any dtype. On an integer or bool dtype finite bounds are stored exactly in the dtype’s domain and must be integers (0.5 is the ValueError class); otherwise they are floats. NaN is refused.

low

method[source]
fn low(&self) -> Option<BoxBound>

The lower bound: None for an unbounded Box.

high

method[source]
fn high(&self) -> Option<BoxBound>

The upper bound: None for an unbounded Box.

bounds_kind

method[source]
fn bounds_kind(&self) -> Option<BoundsKind>

How the bounds are stored: None when the spec has no bounds.

Trait implementations

  • impl Clone for Box
  • impl Deref for Box
  • impl Display for Box
  • impl Debug for Box
  • impl PartialEq for Box
  • impl PartialEq<Space> for Box
  • impl PartialEq<Box> for Space
  • impl From<Box> for Space
  • impl From<Box> for SpaceSpec
  • impl From<&Box> for SpaceSpec
  • impl TryFrom<Space> for Box