Package elki.data
Class SparseFloatVector.Factory
- java.lang.Object
-
- elki.data.SparseFloatVector.Factory
-
- All Implemented Interfaces:
FeatureVector.Factory<SparseFloatVector,java.lang.Number>,NumberVector.Factory<SparseFloatVector>,SparseNumberVector.Factory<SparseFloatVector>
- Enclosing class:
- SparseFloatVector
public static class SparseFloatVector.Factory extends java.lang.Object implements SparseNumberVector.Factory<SparseFloatVector>
Factory class.- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSparseFloatVector.Factory.ParParameterization class.
-
Constructor Summary
Constructors Constructor Description Factory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBufferSerializer<SparseFloatVector>getDefaultSerializer()Get the default serializer for this type.java.lang.Class<? super SparseFloatVector>getRestrictionClass()Get the objects type restriction.<A> SparseFloatVectornewFeatureVector(A array, ArrayAdapter<? extends java.lang.Number,A> adapter)Returns a new FeatureVector of V for the given values.<A> SparseFloatVectornewNumberVector(A array, NumberArrayAdapter<?,? super A> adapter)Instantiate from any number-array like object.SparseFloatVectornewNumberVector(it.unimi.dsi.fastutil.ints.Int2DoubleOpenHashMap dvalues, int maxdim)Returns a new NumberVector of N for the given values.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.data.NumberVector.Factory
newNumberVector, newNumberVector
-
-
-
-
Method Detail
-
newFeatureVector
public <A> SparseFloatVector newFeatureVector(A array, ArrayAdapter<? extends java.lang.Number,A> adapter)
Description copied from interface:FeatureVector.FactoryReturns a new FeatureVector of V for the given values.- Specified by:
newFeatureVectorin interfaceFeatureVector.Factory<SparseFloatVector,java.lang.Number>- Type Parameters:
A- Array type- Parameters:
array- the values of the featureVectoradapter- adapter class- Returns:
- a new FeatureVector of V for the given values
-
newNumberVector
public <A> SparseFloatVector newNumberVector(A array, NumberArrayAdapter<?,? super A> adapter)
Description copied from interface:NumberVector.FactoryInstantiate from any number-array like object.- Specified by:
newNumberVectorin interfaceNumberVector.Factory<SparseFloatVector>- Type Parameters:
A- Array type- Parameters:
array- Arrayadapter- Adapter- Returns:
- a new NumberVector of N for the given values.
-
newNumberVector
public SparseFloatVector newNumberVector(it.unimi.dsi.fastutil.ints.Int2DoubleOpenHashMap dvalues, int maxdim)
Description copied from interface:SparseNumberVector.FactoryReturns a new NumberVector of N for the given values.- Specified by:
newNumberVectorin interfaceSparseNumberVector.Factory<SparseFloatVector>- Parameters:
dvalues- the values of the NumberVectormaxdim- Maximum dimensionality.- Returns:
- a new NumberVector of N for the given values
-
getDefaultSerializer
public ByteBufferSerializer<SparseFloatVector> getDefaultSerializer()
Description copied from interface:FeatureVector.FactoryGet the default serializer for this type.Note, this may be
nullwhen no serializer is available.- Specified by:
getDefaultSerializerin interfaceFeatureVector.Factory<SparseFloatVector,java.lang.Number>- Returns:
- Serializer
-
getRestrictionClass
public java.lang.Class<? super SparseFloatVector> getRestrictionClass()
Description copied from interface:FeatureVector.FactoryGet the objects type restriction.- Specified by:
getRestrictionClassin interfaceFeatureVector.Factory<SparseFloatVector,java.lang.Number>- Returns:
- Restriction class
-
-