I - type of the itemsF - type of the featuresV - type of the information about item-feature pairspublic class SimpleFeatureData<I,F,V> extends Object implements FeatureData<I,F,V>
| Modifier | Constructor and Description |
|---|---|
protected |
SimpleFeatureData(Map<I,List<org.jooq.lambda.tuple.Tuple2<F,V>>> itemMap,
Map<F,List<org.jooq.lambda.tuple.Tuple2<I,V>>> featMap)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsFeature(F f)
Checks whether the index contains a feature.
|
boolean |
containsItem(I i)
Checks whether the index contains an item.
|
Stream<F> |
getAllFeatures()
Retrieves a stream of the indexed features.
|
Stream<I> |
getAllItems()
Retrieves a stream of the indexed items.
|
Stream<org.jooq.lambda.tuple.Tuple2<I,V>> |
getFeatureItems(F f)
Returns a stream of items with the feature.
|
Stream<F> |
getFeaturesWithItems()
Returns a stream of features with items.
|
Stream<org.jooq.lambda.tuple.Tuple2<F,V>> |
getItemFeatures(I i)
Returns a stream of features of the item.
|
Stream<I> |
getItemsWithFeatures()
Returns a stream of items with features.
|
static <I,F,V> SimpleFeatureData<I,F,V> |
load(Stream<org.jooq.lambda.tuple.Tuple3<I,F,V>> tuples)
Loads an instance of the class from a stream of triples.
|
int |
numFeatures()
Counts the number of indexed features.
|
int |
numFeatures(I i)
Returns the number of features of the item.
|
int |
numFeaturesWithItems()
Returns the number of features with items.
|
int |
numItems()
Counts the number of indexed items.
|
int |
numItems(F f)
Returns the number of items with the feature.
|
int |
numItemsWithFeatures()
Returns the number of items with features.
|
public Stream<F> getAllFeatures()
FeatureIndexgetAllFeatures in interface FeatureIndex<F>public Stream<I> getAllItems()
ItemIndexgetAllItems in interface ItemIndex<I>public Stream<org.jooq.lambda.tuple.Tuple2<I,V>> getFeatureItems(F f)
FeatureDatagetFeatureItems in interface FeatureData<I,F,V>f - featurepublic Stream<org.jooq.lambda.tuple.Tuple2<F,V>> getItemFeatures(I i)
FeatureDatagetItemFeatures in interface FeatureData<I,F,V>i - itempublic boolean containsFeature(F f)
FeatureIndexcontainsFeature in interface FeatureIndex<F>f - featurepublic int numFeatures()
FeatureIndexnumFeatures in interface FeatureIndex<F>public int numFeatures(I i)
FeatureDatanumFeatures in interface FeatureData<I,F,V>i - itempublic boolean containsItem(I i)
ItemIndexcontainsItem in interface ItemIndex<I>i - itempublic int numItems()
ItemIndexpublic int numItems(F f)
FeatureDatanumItems in interface FeatureData<I,F,V>f - featurepublic int numItemsWithFeatures()
FeatureDatanumItemsWithFeatures in interface FeatureData<I,F,V>public int numFeaturesWithItems()
FeatureDatanumFeaturesWithItems in interface FeatureData<I,F,V>public Stream<I> getItemsWithFeatures()
FeatureDatagetItemsWithFeatures in interface FeatureData<I,F,V>public Stream<F> getFeaturesWithItems()
FeatureDatagetFeaturesWithItems in interface FeatureData<I,F,V>public static <I,F,V> SimpleFeatureData<I,F,V> load(Stream<org.jooq.lambda.tuple.Tuple3<I,F,V>> tuples)
I - type of itemF - type of featV - type of valuetuples - stream of item-feat-value triplesCopyright © 2016. All rights reserved.