F
- type of the featurespublic class SimpleFastFeatureIndex<F> extends Object implements FastFeatureIndex<F>
Modifier | Constructor and Description |
---|---|
protected |
SimpleFastFeatureIndex()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected int |
add(F f)
Add a new feature to the index.
|
boolean |
containsFeature(F f)
Checks whether the index contains a feature.
|
int |
feature2fidx(F f)
Returns the index assigned to the feature.
|
F |
fidx2feature(int fidx)
Returns the feature represented with the index.
|
Stream<F> |
getAllFeatures()
Retrieves a stream of the indexed features.
|
static <F> SimpleFastFeatureIndex<F> |
load(Stream<F> features)
Creates a feature index from a stream of feature objects.
|
int |
numFeatures()
Counts the number of indexed features.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
feature2fidx, feature2fidx, fidx2feature, fidx2feature, getAllFidx
public boolean containsFeature(F f)
FeatureIndex
containsFeature
in interface FeatureIndex<F>
containsFeature
in interface FastFeatureIndex<F>
f
- featurepublic int numFeatures()
FeatureIndex
numFeatures
in interface FeatureIndex<F>
public Stream<F> getAllFeatures()
FeatureIndex
getAllFeatures
in interface FeatureIndex<F>
getAllFeatures
in interface FastFeatureIndex<F>
public int feature2fidx(F f)
FastFeatureIndex
feature2fidx
in interface FastFeatureIndex<F>
f
- featurepublic F fidx2feature(int fidx)
FastFeatureIndex
fidx2feature
in interface FastFeatureIndex<F>
fidx
- feature indexprotected int add(F f)
f
- id of the featurepublic static <F> SimpleFastFeatureIndex<F> load(Stream<F> features)
F
- type of the featuresfeatures
- stream of feature objectsCopyright © 2016. All rights reserved.