Struct relearn::spaces::SingletonSpace [−][src]
pub struct SingletonSpace;
Expand description
A space containing a single element.
Implementations
Trait Implementations
Length of the feature vectors in which which elements are encoded.
fn batch_features<'a, I>(&self, elements: I) -> T2 where
I: IntoIterator<Item = &'a Self::Element>,
Self::Element: 'a,
fn batch_features<'a, I>(&self, elements: I) -> T2 where
I: IntoIterator<Item = &'a Self::Element>,
Self::Element: 'a,
Construct a matrix of feature vectors for a set of elements. Read more
fn batch_features_out<'a, I>(&self, _elements: I, _out: &mut T2, _zeroed: bool) where
I: IntoIterator<Item = &'a Self::Element>,
Self::Element: 'a,
fn batch_features_out<'a, I>(&self, _elements: I, _out: &mut T2, _zeroed: bool) where
I: IntoIterator<Item = &'a Self::Element>,
Self::Element: 'a,
Construct a matrix of feature vectors for a set of elements. Read more
Returns the “default value” for a type. Read more
Generate a random value of T
, using rng
as the source of randomness.
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
Create a value of type T
from an element reference.
Represent elements as a float vector of length 0.
Try to convert an index to an element. Read more
“Parameterize” a deterministic distribution with no parameters.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Represent elements as an integer vector of length 0.
fn batch_repr<'a, I>(&self, elements: I) -> Tensor where
I: IntoIterator<Item = &'a Self::Element>,
Self::Element: 'a,
fn batch_repr<'a, I>(&self, elements: I) -> Tensor where
I: IntoIterator<Item = &'a Self::Element>,
Self::Element: 'a,
Represent a batch of elements as an array.
Auto Trait Implementations
impl RefUnwindSafe for SingletonSpace
impl Send for SingletonSpace
impl Sync for SingletonSpace
impl Unpin for SingletonSpace
impl UnwindSafe for SingletonSpace
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.