subset-map
Summary
subset-map is a map like data structure where the keys are combinations
of elements the SubsetMap has been initialized with.
The order of the elements is defined by the position of an element
within the elements the SubsetMap has been initialized with.
SubsetMap clones the elements into the subsets. So you should
consider to only use element types where you would feel good to assign
them the Copy trait.
Lookup is done linearly. Therefore SubsetMap should only be used
with not too big sets of elements.
Example
use *;
// Initialize the map where the payloads are basically the keys
let subset_map = fill;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
// No internal ordering is performed:
// The position in the original set is crucial:
assert_eq!;
Features
The serde feature allows serialization and deserialization with serde.
Recent Changes
- 0.2.2
- fixed
sizefunction
- fixed
- 0.2.1
- Optimized
findandlookupa bit - Added
sizefinction to return the number of combinations
- Optimized
- 0.2.0
- Renamed MatchQuality to
MatchResult MatchResultalso contains the no match case- improved documentation
- Renamed MatchQuality to
License
subset-map is distributed under the terms of both the MIT license and the Apache License (Version
2.0).
Copyright(2018) Christian Douven
See LICENSE-APACHE and LICENSE-MIT for details.
License: Apache-2.0/MIT