logo
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

Performs the conversion.

Performs the conversion.

Should always be Self

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

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

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

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

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.