Package elki.data
Class SparseShortVector.Factory
- java.lang.Object
-
- elki.data.SparseShortVector.Factory
-
- All Implemented Interfaces:
FeatureVector.Factory<SparseShortVector,java.lang.Number>
,NumberVector.Factory<SparseShortVector>
,SparseNumberVector.Factory<SparseShortVector>
- Enclosing class:
- SparseShortVector
public static class SparseShortVector.Factory extends java.lang.Object implements SparseNumberVector.Factory<SparseShortVector>
Factory class.- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SparseShortVector.Factory.Par
Parameterization class.
-
Constructor Summary
Constructors Constructor Description Factory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBufferSerializer<SparseShortVector>
getDefaultSerializer()
Get the default serializer for this type.java.lang.Class<? super SparseShortVector>
getRestrictionClass()
Get the objects type restriction.<A> SparseShortVector
newFeatureVector(A array, ArrayAdapter<? extends java.lang.Number,A> adapter)
Returns a new FeatureVector of V for the given values.<A> SparseShortVector
newNumberVector(A array, NumberArrayAdapter<?,? super A> adapter)
Instantiate from any number-array like object.SparseShortVector
newNumberVector(it.unimi.dsi.fastutil.ints.Int2DoubleOpenHashMap values, 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> SparseShortVector newFeatureVector(A array, ArrayAdapter<? extends java.lang.Number,A> adapter)
Description copied from interface:FeatureVector.Factory
Returns a new FeatureVector of V for the given values.- Specified by:
newFeatureVector
in interfaceFeatureVector.Factory<SparseShortVector,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> SparseShortVector newNumberVector(A array, NumberArrayAdapter<?,? super A> adapter)
Description copied from interface:NumberVector.Factory
Instantiate from any number-array like object.- Specified by:
newNumberVector
in interfaceNumberVector.Factory<SparseShortVector>
- Type Parameters:
A
- Array type- Parameters:
array
- Arrayadapter
- Adapter- Returns:
- a new NumberVector of N for the given values.
-
newNumberVector
public SparseShortVector newNumberVector(it.unimi.dsi.fastutil.ints.Int2DoubleOpenHashMap values, int maxdim)
Description copied from interface:SparseNumberVector.Factory
Returns a new NumberVector of N for the given values.- Specified by:
newNumberVector
in interfaceSparseNumberVector.Factory<SparseShortVector>
- Parameters:
values
- the values of the NumberVectormaxdim
- Maximum dimensionality.- Returns:
- a new NumberVector of N for the given values
-
getDefaultSerializer
public ByteBufferSerializer<SparseShortVector> getDefaultSerializer()
Description copied from interface:FeatureVector.Factory
Get the default serializer for this type.Note, this may be
null
when no serializer is available.- Specified by:
getDefaultSerializer
in interfaceFeatureVector.Factory<SparseShortVector,java.lang.Number>
- Returns:
- Serializer
-
getRestrictionClass
public java.lang.Class<? super SparseShortVector> getRestrictionClass()
Description copied from interface:FeatureVector.Factory
Get the objects type restriction.- Specified by:
getRestrictionClass
in interfaceFeatureVector.Factory<SparseShortVector,java.lang.Number>
- Returns:
- Restriction class
-
-