I - type of the itemsF - type of the featuresV - type of the information about item-feature pairspublic class SimpleFastFeatureData<I,F,V> extends AbstractFastFeatureData<I,F,V>
| Modifier | Constructor and Description |
|---|---|
protected |
SimpleFastFeatureData(List<List<Tuple2io<V>>> iidxList,
List<List<Tuple2io<V>>> fidxList,
FastItemIndex<I> ii,
FastFeatureIndex<F> fi)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Stream<Tuple2io<V>> |
getFidxItems(int fidx)
Returns the items having a feature.
|
IntStream |
getFidxWithItems()
Returns the features that are associated with items.
|
Stream<Tuple2io<V>> |
getIidxFeatures(int iidx)
Returns the features associated with an item.
|
IntStream |
getIidxWithFeatures()
Returns the indexes of the items with features.
|
static <I,F,V> SimpleFastFeatureData<I,F,V> |
load(Stream<org.jooq.lambda.tuple.Tuple3<I,F,V>> tuples,
FastItemIndex<I> iIndex,
FastFeatureIndex<F> fIndex)
Loads a SimpleFastFeatureData by processing a stream of item-feature-value triples.
|
int |
numFeatures(int iidx)
Returns the number of features associated with an item.
|
int |
numFeaturesWithItems()
Returns the number of features with items.
|
int |
numItems(int fidx)
Returns the number of items having a feature.
|
int |
numItemsWithFeatures()
Returns the number of items with features.
|
containsFeature, containsItem, feature2fidx, fidx2feature, getAllFeatures, getAllItems, getFeatureItems, getFeaturesWithItems, getItemFeatures, getItemsWithFeatures, iidx2item, item2iidx, numFeatures, numFeatures, numItems, numItemsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAllIidx, iidx2item, iidx2item, item2iidx, item2iidxfeature2fidx, feature2fidx, fidx2feature, fidx2feature, getAllFidxprotected SimpleFastFeatureData(List<List<Tuple2io<V>>> iidxList, List<List<Tuple2io<V>>> fidxList, FastItemIndex<I> ii, FastFeatureIndex<F> fi)
iidxList - list of lists of item-feature pairs by item indexfidxList - list of lists of item-feature pairs by feature indexii - item indexfi - feature indexpublic Stream<Tuple2io<V>> getIidxFeatures(int iidx)
FastFeatureDataiidx - item indexpublic Stream<Tuple2io<V>> getFidxItems(int fidx)
FastFeatureDatafidx - feature indexpublic int numItems(int fidx)
FastFeatureDatafidx - feature indexpublic int numFeatures(int iidx)
FastFeatureDataiidx - item indexpublic IntStream getIidxWithFeatures()
FastFeatureDatapublic IntStream getFidxWithItems()
FastFeatureDatapublic int numItemsWithFeatures()
FeatureDatapublic int numFeaturesWithItems()
FeatureDatapublic static <I,F,V> SimpleFastFeatureData<I,F,V> load(Stream<org.jooq.lambda.tuple.Tuple3<I,F,V>> tuples, FastItemIndex<I> iIndex, FastFeatureIndex<F> fIndex)
I - type of itemsF - type of featsV - type of valuetuples - item-feature-value triplesiIndex - item indexfIndex - feat indexCopyright © 2016. All rights reserved.