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]

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]

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]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

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>

The value tree generated by this Strategy.

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

Generate a recursive structure with self items as leaves. Read more

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]

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more

fn sboxed(self) -> SBoxedStrategy<Self::Value> where
    Self: Send + Sync + 'static, 
[src]

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more

fn no_shrink(self) -> NoShrink<Self>[src]

Wraps this strategy to prevent values from being subject to shrinking. 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> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[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]

Checks if self is actually part of its subset T (and can be converted to it).

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]

The inclusion map: converts self to the equivalent element of its superset.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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]

🔬 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<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V