Struct relearn::spaces::TupleSpace3
source · [−]pub struct TupleSpace3<A, B, C>(pub A, pub B, pub C);
Expand description
Cartesian product of three spaces; elements are tuples
Tuple Fields
0: A
1: B
2: C
Trait Implementations
sourceimpl<A: Clone, B: Clone, C: Clone> Clone for TupleSpace3<A, B, C>
impl<A: Clone, B: Clone, C: Clone> Clone for TupleSpace3<A, B, C>
sourcefn clone(&self) -> TupleSpace3<A, B, C>
fn clone(&self) -> TupleSpace3<A, B, C>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<A: Default, B: Default, C: Default> Default for TupleSpace3<A, B, C>
impl<A: Default, B: Default, C: Default> Default for TupleSpace3<A, B, C>
sourcefn default() -> TupleSpace3<A, B, C>
fn default() -> TupleSpace3<A, B, C>
Returns the “default value” for a type. Read more
sourceimpl<'de, A, B, C> Deserialize<'de> for TupleSpace3<A, B, C> where
A: Deserialize<'de>,
B: Deserialize<'de>,
C: Deserialize<'de>,
impl<'de, A, B, C> Deserialize<'de> for TupleSpace3<A, B, C> where
A: Deserialize<'de>,
B: Deserialize<'de>,
C: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<A: Space + Distribution<<A as Space>::Element>, B: Space + Distribution<<B as Space>::Element>, C: Space + Distribution<<C as Space>::Element>> Distribution<<TupleSpace3<A, B, C> as Space>::Element> for TupleSpace3<A, B, C>
impl<A: Space + Distribution<<A as Space>::Element>, B: Space + Distribution<<B as Space>::Element>, C: Space + Distribution<<C as Space>::Element>> Distribution<<TupleSpace3<A, B, C> as Space>::Element> for TupleSpace3<A, B, C>
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> <Self as Space>::Element
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> <Self as Space>::Element
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<A: FeatureSpace, B: FeatureSpace, C: FeatureSpace> FeatureSpace for TupleSpace3<A, B, C>
impl<A: FeatureSpace, B: FeatureSpace, C: FeatureSpace> FeatureSpace for TupleSpace3<A, B, C>
sourcefn num_features(&self) -> usize
fn num_features(&self) -> usize
Length of the encoded feature vectors.
sourcefn features_out<'a, F: Float>(
&self,
element: &Self::Element,
out: &'a mut [F],
zeroed: bool
) -> &'a mut [F]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
fn features_out<'a, F: Float>(
&self,
element: &Self::Element,
out: &'a mut [F],
zeroed: bool
) -> &'a mut [F]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
Encode the feature vector of an element into a mutable slice. Read more
sourcefn features<T>(&self, element: &Self::Element) -> T where
T: BuildFromArray1D,
<T::Array as NumArray1D>::Elem: Float,
fn features<T>(&self, element: &Self::Element) -> T where
T: BuildFromArray1D,
<T::Array as NumArray1D>::Elem: Float,
Encode the feature vector of an element into an array.
sourcefn batch_features_out<'a, I, A>(
&self,
elements: I,
out: &mut ArrayBase<A, Ix2>,
zeroed: bool
) where
I: IntoIterator<Item = &'a Self::Element>,
Self::Element: 'a,
A: DataMut,
A::Elem: Float,
fn batch_features_out<'a, I, A>(
&self,
elements: I,
out: &mut ArrayBase<A, Ix2>,
zeroed: bool
) where
I: IntoIterator<Item = &'a Self::Element>,
Self::Element: 'a,
A: DataMut,
A::Elem: Float,
Encode the feature vectors of multiple elements into rows of a two-dimensional array. Read more
sourcefn batch_features<'a, I, T>(&self, elements: I) -> T where
I: IntoIterator<Item = &'a Self::Element>,
I::IntoIter: ExactSizeIterator,
Self::Element: 'a,
T: BuildFromArray2D,
<T::Array as NumArray2D>::Elem: Float,
fn batch_features<'a, I, T>(&self, elements: I) -> T where
I: IntoIterator<Item = &'a Self::Element>,
I::IntoIter: ExactSizeIterator,
Self::Element: 'a,
T: BuildFromArray2D,
<T::Array as NumArray2D>::Elem: Float,
Encode the feature vectors of multiple elements as rows of a two-dimensional array.
sourceimpl<A: FiniteSpace, B: FiniteSpace, C: FiniteSpace> FiniteSpace for TupleSpace3<A, B, C>
impl<A: FiniteSpace, B: FiniteSpace, C: FiniteSpace> FiniteSpace for TupleSpace3<A, B, C>
sourceimpl<A: LogElementSpace, B: LogElementSpace, C: LogElementSpace> LogElementSpace for TupleSpace3<A, B, C>
impl<A: LogElementSpace, B: LogElementSpace, C: LogElementSpace> LogElementSpace for TupleSpace3<A, B, C>
sourcefn log_element<L: StatsLogger + ?Sized>(
&self,
name: &'static str,
element: &Self::Element,
logger: &mut L
) -> Result<(), LogError>
fn log_element<L: StatsLogger + ?Sized>(
&self,
name: &'static str,
element: &Self::Element,
logger: &mut L
) -> Result<(), LogError>
Log an element of the space
sourceimpl<A: NonEmptySpace, B: NonEmptySpace, C: NonEmptySpace> NonEmptySpace for TupleSpace3<A, B, C>
impl<A: NonEmptySpace, B: NonEmptySpace, C: NonEmptySpace> NonEmptySpace for TupleSpace3<A, B, C>
sourcefn some_element(&self) -> <Self as Space>::Element
fn some_element(&self) -> <Self as Space>::Element
An arbitrary deterministic element from the space.
sourceimpl<A: PartialEq, B: PartialEq, C: PartialEq> PartialEq<TupleSpace3<A, B, C>> for TupleSpace3<A, B, C>
impl<A: PartialEq, B: PartialEq, C: PartialEq> PartialEq<TupleSpace3<A, B, C>> for TupleSpace3<A, B, C>
sourcefn eq(&self, other: &TupleSpace3<A, B, C>) -> bool
fn eq(&self, other: &TupleSpace3<A, B, C>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TupleSpace3<A, B, C>) -> bool
fn ne(&self, other: &TupleSpace3<A, B, C>) -> bool
This method tests for !=
.
sourceimpl<A, B, C> Serialize for TupleSpace3<A, B, C> where
A: Serialize,
B: Serialize,
C: Serialize,
impl<A, B, C> Serialize for TupleSpace3<A, B, C> where
A: Serialize,
B: Serialize,
C: Serialize,
sourceimpl<A: SubsetOrd, B: SubsetOrd, C: SubsetOrd> SubsetOrd for TupleSpace3<A, B, C>
impl<A: SubsetOrd, B: SubsetOrd, C: SubsetOrd> SubsetOrd for TupleSpace3<A, B, C>
sourcefn subset_cmp(&self, other: &Self) -> Option<Ordering>
fn subset_cmp(&self, other: &Self) -> Option<Ordering>
Compare using the subset relationship. This is a partial order.
sourcefn strict_subset_of(&self, other: &Self) -> bool
fn strict_subset_of(&self, other: &Self) -> bool
Check if this is a strict subset of other
.
sourcefn subset_of(&self, other: &Self) -> bool
fn subset_of(&self, other: &Self) -> bool
Check if this is a subset (strict or equal) of other
.
sourcefn strict_superset_of(&self, other: &Self) -> bool
fn strict_superset_of(&self, other: &Self) -> bool
Check if this is a strict superset of other
.
sourcefn superset_of(&self, other: &Self) -> bool
fn superset_of(&self, other: &Self) -> bool
Check if this is a superset (strict or equal) of other
.
impl<A: Copy, B: Copy, C: Copy> Copy for TupleSpace3<A, B, C>
impl<A: Eq, B: Eq, C: Eq> Eq for TupleSpace3<A, B, C>
impl<A, B, C> StructuralEq for TupleSpace3<A, B, C>
impl<A, B, C> StructuralPartialEq for TupleSpace3<A, B, C>
Auto Trait Implementations
impl<A, B, C> RefUnwindSafe for TupleSpace3<A, B, C> where
A: RefUnwindSafe,
B: RefUnwindSafe,
C: RefUnwindSafe,
impl<A, B, C> Send for TupleSpace3<A, B, C> where
A: Send,
B: Send,
C: Send,
impl<A, B, C> Sync for TupleSpace3<A, B, C> where
A: Sync,
B: Sync,
C: Sync,
impl<A, B, C> Unpin for TupleSpace3<A, B, C> where
A: Unpin,
B: Unpin,
C: Unpin,
impl<A, B, C> UnwindSafe for TupleSpace3<A, B, C> where
A: UnwindSafe,
B: UnwindSafe,
C: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.