Struct hilbert::permutation::Permutation[][src]

pub struct Permutation { /* fields omitted */ }
Expand description

Defines a one-to-one mapping from one ordering of values to another. This can be used to rearrange the coordinates in a Point.

No coordinate value is lost or duplicated, so long as every value from 0 to dimensions - 1 is present in the moves_to collection.

Implementations

Create a Permutation that causes no changes to the order of dimensions if applied to a Point.

Create a Permutation that performs the given set of moves.

Create a random permutation which will cause almost every dimension to be shifted to a new position.

Create a new Permutation where the two given dimensions are swapped.

This is useful for controlled permutation, unlike the chaotically scrambled Permutations generated by the random method.

Number of dimensions of points that can be handled by the permutation.

Apply the Permutation to data, cloning and reordering the input values appropriately.

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.