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.

Construct a matrix of feature vectors for a set of elements. Read more

Construct a matrix of feature vectors for a set of elements. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Formats the value using the given formatter. 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 distribution of values of ‘S’ by mapping the output of Self through the closure F Read more

Create a value of type T from an element reference.

Represent elements as a float vector of length 0.

Convert an element of the space into a feature vector. Read more

Convert an element of the space into a feature vector. Read more

The number of elements in the space.

Get the index of an element.

Try to convert an index to an element. Read more

Try to convert an index to an element. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

“Parameterize” a deterministic distribution with no parameters.

Batched distribution type. Read more

Size of the parameter vector for which elements are sampled.

Sample a single element given a parameter vector. Read more

The distribution parameterized by the given parameter vector. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Represent elements as an integer vector of length 0.

Representation of a single element.

Represent a batch of elements as an array.

Check whether a particular value is contained in the space.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert an element into a value of type T.

Compare self to key and return true if they are equal.

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.