pub struct SmallInts<F: Integer + Bounded + NumCast + Copy, B: Integer + NumCast + Copy> { /* private fields */ }
Expand description

Data structure for storing a sequence of small integers with few big ones space efficiently while supporting classical vector operations.

Implementations

Create a new instance.

Create a new instance with a given capacity.

Create a new instance containing n times the integer v (and v is expected to be small).

Return the integer at position i.

Append v to the sequence. This will determine whether v is big or small and store it accordingly.

Set value of position i to v. This will determine whether v is big or small and store it accordingly.

Iterate over sequence. Values will be returned in the big integer type (B).

Decompress into a normal vector of big integers (type B).

Length of the sequence.

is the sequence empty?

Trait Implementations

Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. 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.

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.