pub struct NormalRandomInitializer {
    pub mean: f32,
    pub standard_deviation: f32,
}
Expand description

A Initializer that generates random numbers in a normal distribution based on a mean and a standard deviation provided by the new method

Fields§

§mean: f32

The mean for the Normal distribution

§standard_deviation: f32

The standard deviation for the Normal distribution

Implementations§

Creates a new Normal Random initializer

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize and return an instance of Self from the given deserializer.
Converts to this type from the input type.
Generates just one number based on the Initializer’s implementation
Generates a Vec of numbers initialized based on the Initializer’s implementation
Generates a Matrix of numbers initialized based on the Initializer’s implementation
Generates a 3D Matrix of Vec of numbers initialized based on the Initializer’s implementation
Returns the value of the object, excluding children, as a string. Exactly what the value returned here is depends on the type. For some types, like a plain array, there isn’t much of a value, the entire information of object resides in the children. For other cases, like a department in an organisation, it might make sense to have the value be the name, and have all the other properties as children.
Returns an the name and &dyn Introspect for the child with the given index, or if no child with that index exists, None. All the children should be indexed consecutively starting at 0 with no gaps, all though there isn’t really anything stopping the user of the trait to have any arbitrary index strategy, consecutive numbering 0, 1, 2, … etc is strongly encouraged.
Returns the total number of children. The default implementation calculates this by simply calling introspect_child with higher and higher indexes until it returns None. It gives up if the count reaches 10000. If your type can be bigger and you want to be able to introspect it, override this method.
Serialize self into the given serializer.
Returns a representation of the schema used by this Serialize implementation for the given version.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. 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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more