Struct nalgebra::proptest::MatrixStrategy [−][src]
pub struct MatrixStrategy<NStrategy, R: Dim, C: Dim> where
NStrategy: Strategy,
NStrategy::Value: Scalar,
DefaultAllocator: Allocator<NStrategy::Value, R, C>, { /* fields omitted */ }
Expand description
A strategy for generating matrices.
Trait Implementations
impl<NStrategy: Clone, R: Clone + Dim, C: Clone + Dim> Clone for MatrixStrategy<NStrategy, R, C> where
NStrategy: Strategy,
NStrategy::Value: Scalar,
DefaultAllocator: Allocator<NStrategy::Value, R, C>,
NStrategy::Value: Clone,
[src]
impl<NStrategy: Clone, R: Clone + Dim, C: Clone + Dim> Clone for MatrixStrategy<NStrategy, R, C> where
NStrategy: Strategy,
NStrategy::Value: Scalar,
DefaultAllocator: Allocator<NStrategy::Value, R, C>,
NStrategy::Value: Clone,
[src]fn clone(&self) -> MatrixStrategy<NStrategy, R, C>
[src]
fn clone(&self) -> MatrixStrategy<NStrategy, R, C>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl<NStrategy: Debug, R: Debug + Dim, C: Debug + Dim> Debug for MatrixStrategy<NStrategy, R, C> where
NStrategy: Strategy,
NStrategy::Value: Scalar,
DefaultAllocator: Allocator<NStrategy::Value, R, C>,
NStrategy::Value: Debug,
[src]
impl<NStrategy: Debug, R: Debug + Dim, C: Debug + Dim> Debug for MatrixStrategy<NStrategy, R, C> where
NStrategy: Strategy,
NStrategy::Value: Scalar,
DefaultAllocator: Allocator<NStrategy::Value, R, C>,
NStrategy::Value: Debug,
[src]impl<NStrategy, R, C> Strategy for MatrixStrategy<NStrategy, R, C> where
NStrategy: Strategy,
NStrategy::Value: Scalar,
R: Dim,
C: Dim,
DefaultAllocator: Allocator<NStrategy::Value, R, C>,
[src]
impl<NStrategy, R, C> Strategy for MatrixStrategy<NStrategy, R, C> where
NStrategy: Strategy,
NStrategy::Value: Scalar,
R: Dim,
C: Dim,
DefaultAllocator: Allocator<NStrategy::Value, R, C>,
[src]type Tree = MatrixValueTree<NStrategy::Value, R, C>
type Tree = MatrixValueTree<NStrategy::Value, R, C>
The value tree generated by this Strategy
.
type Value = OMatrix<NStrategy::Value, R, C>
type Value = OMatrix<NStrategy::Value, R, C>
The type of value used by functions under test generated by this Strategy. Read more
fn new_tree(&self, runner: &mut TestRunner) -> NewTree<Self>
[src]
fn new_tree(&self, runner: &mut TestRunner) -> NewTree<Self>
[src]Generate a new value tree from the given runner. Read more
fn prop_map<O, F>(self, fun: F) -> Map<Self, F> where
F: Fn(Self::Value) -> O,
O: Debug,
[src]
fn prop_map<O, F>(self, fun: F) -> Map<Self, F> where
F: Fn(Self::Value) -> O,
O: Debug,
[src]Returns a strategy which produces values transformed by the function
fun
. Read more
fn prop_map_into<O>(self) -> MapInto<Self, O> where
O: Debug,
Self::Value: Into<O>,
[src]
fn prop_map_into<O>(self) -> MapInto<Self, O> where
O: Debug,
Self::Value: Into<O>,
[src]Returns a strategy which produces values of type O
by transforming
Self
with Into<O>
. Read more
fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F> where
F: Fn(Self::Value, TestRng) -> O,
O: Debug,
[src]
fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F> where
F: Fn(Self::Value, TestRng) -> O,
O: Debug,
[src]Returns a strategy which produces values transformed by the function
fun
, which is additionally given a random number generator. Read more
fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>> where
S: Strategy,
F: Fn(Self::Value) -> S,
[src]
fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>> where
S: Strategy,
F: Fn(Self::Value) -> S,
[src]Maps values produced by this strategy into new strategies and picks values from those strategies. Read more
fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>> where
S: Strategy,
F: Fn(Self::Value) -> S,
[src]
fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>> where
S: Strategy,
F: Fn(Self::Value) -> S,
[src]Maps values produced by this strategy into new strategies and picks values from those strategies while considering the new strategies to be independent. Read more
fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F> where
S: Strategy,
F: Fn(Self::Value) -> S,
[src]
fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F> where
S: Strategy,
F: Fn(Self::Value) -> S,
[src]Similar to prop_ind_flat_map()
, but produces 2-tuples with the input
generated from self
in slot 0 and the derived strategy in slot 1. Read more
fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F> where
R: Into<Reason>,
F: Fn(&Self::Value) -> bool,
[src]
fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F> where
R: Into<Reason>,
F: Fn(&Self::Value) -> bool,
[src]Returns a strategy which only produces values accepted by fun
. Read more
fn prop_filter_map<F, O>(
self,
whence: impl Into<Reason>,
fun: F
) -> FilterMap<Self, F> where
F: Fn(Self::Value) -> Option<O>,
O: Debug,
[src]
fn prop_filter_map<F, O>(
self,
whence: impl Into<Reason>,
fun: F
) -> FilterMap<Self, F> where
F: Fn(Self::Value) -> Option<O>,
O: Debug,
[src]Returns a strategy which only produces transformed values where fun
returns Some(value)
and rejects those where fun
returns None
. Read more
fn prop_union(self, other: Self) -> Union<Self>
[src]
fn prop_union(self, other: Self) -> Union<Self>
[src]Returns a strategy which picks uniformly from self
and other
. Read more
fn prop_recursive<R, F>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F
) -> Recursive<Self::Value, F> where
Self: 'static,
R: 'static + Strategy<Value = Self::Value>,
F: Fn(BoxedStrategy<Self::Value>) -> R,
[src]
fn prop_recursive<R, F>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F
) -> Recursive<Self::Value, F> where
Self: 'static,
R: 'static + Strategy<Value = Self::Value>,
F: Fn(BoxedStrategy<Self::Value>) -> R,
[src]Generate a recursive structure with self
items as leaves. Read more
fn prop_shuffle(self) -> Shuffle<Self> where
Self::Value: Shuffleable,
[src]
fn prop_shuffle(self) -> Shuffle<Self> where
Self::Value: Shuffleable,
[src]Shuffle the contents of the values produced by this strategy. Read more
fn boxed(self) -> BoxedStrategy<Self::Value> where
Self: 'static,
[src]
fn boxed(self) -> BoxedStrategy<Self::Value> where
Self: 'static,
[src]Erases the type of this Strategy
so it can be passed around as a
simple trait object. Read more
Auto Trait Implementations
impl<NStrategy, R, C> !RefUnwindSafe for MatrixStrategy<NStrategy, R, C>
impl<NStrategy, R, C> !Send for MatrixStrategy<NStrategy, R, C>
impl<NStrategy, R, C> !Sync for MatrixStrategy<NStrategy, R, C>
impl<NStrategy, R, C> Unpin for MatrixStrategy<NStrategy, R, C>
impl<NStrategy, R, C> !UnwindSafe for MatrixStrategy<NStrategy, R, C>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn to_subset(&self) -> Option<SS>
[src]The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
[src]
pub fn is_in_subset(&self) -> bool
[src]Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
[src]
pub fn from_subset(element: &SS) -> SP
[src]The inclusion map: converts self
to the equivalent element of its superset.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,