E- Subset element type.
M- Subset match value type.
protected static class QueryElevationComponent.TrieSubsetMatcher<E extends Comparable<? super E>,M> extends Object
Given a collection of subsets
N, finds all the subsets that are contained (ignoring duplicate elements)
by a provided set
That is, finds all subsets
N for which
s contains all the elements of
n, in any order).
Associates a match value of type <M> to each subset and provides it each time the subset matches (i.e. is contained by the provided set).
This matcher imposes the elements are
It does not keep the subset insertion order.
Duplicate subsets stack their match values.
The time complexity of adding a subset is
n is the size of the subset.
The worst case time complexity of the subset matching is
O(2^s), however a more typical case time
O(s^3) where s is the size of the set to partially match.
Note it does not depend on
N, the size of the collection of subsets, nor on
n, the size of
|Modifier and Type||Class and Description|
|Modifier and Type||Method and Description|
Returns an iterator over all the subsets that are contained by the provided set.
Gets the number of subsets in this matcher.
public int getSubsetCount()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.