pub struct AndPool<P1, P2, ObservationsMarker> where
    P1: Pool,
    P2: Pool
{ pub p1: P1, pub p2: P2, pub p1_weight: f64, pub p2_weight: f64, /* private fields */ }
Expand description

A pool that combines two pools

A convenient way to create an AndPool is to use p1.and(p2, ..), but you are free to use AndPool::new as well.

If the two pools act on the same observations , then the ObservationsMarker generic type parameter should be SameObservations. However, if they act on different observations, then this type parameter should be DifferentObservations. This will influence what observations the AndPool is compatible with.

If both P1 and P2 are CompatibleWithObservations<O>, then AndPool<P1, P2, SameObservations> will be CompatibleWithObservations<O> as well.

If P1 is CompatibleWithObservations<O1> and P2 is CompatibleWithObservations<O2>, then AndPool<P1, P2, DifferentObservations> will be CompatibleWithObservations<(O1, O2)>.

When the AndPool is asked to provide a test case, it will choose between p1 and p2 randomly based on their weights, given by self.p1_weight and self.p2_weight, and based on how recently p1 or p2 made some progress. Pools that make progress will be prefered over pools that do not.

Fields

p1: P1p2: P2p1_weight: f64p2_weight: f64

Implementations

Trait Implementations

Statistics about the pool to be printed to the terminal as the fuzzer is running and saved to a .csv file after the run Read more

The pool’s statistics

Get the index of a random test case. Read more

Gives the relative importance of the pool. It must be a positive number. Read more

Save information about self to the stats folder Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Create an AndPool from both Self and P. 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.