Package elki.data
Class DoubleVector.Factory
- java.lang.Object
-
- elki.data.DoubleVector.Factory
-
- All Implemented Interfaces:
FeatureVector.Factory<DoubleVector,java.lang.Number>
,NumberVector.Factory<DoubleVector>
- Enclosing class:
- DoubleVector
public static class DoubleVector.Factory extends java.lang.Object implements NumberVector.Factory<DoubleVector>
Factory for Double vectors.- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DoubleVector.Factory.Par
Parameterization class.
-
Constructor Summary
Constructors Constructor Description Factory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBufferSerializer<DoubleVector>
getDefaultSerializer()
Get the default serializer for this type.java.lang.Class<? super DoubleVector>
getRestrictionClass()
Get the objects type restriction.<A> DoubleVector
newFeatureVector(A array, ArrayAdapter<? extends java.lang.Number,A> adapter)
Returns a new FeatureVector of V for the given values.DoubleVector
newNumberVector(double[] values)
Returns a new NumberVector of N for the given values.<A> DoubleVector
newNumberVector(A array, NumberArrayAdapter<?,? super A> adapter)
Instantiate from any number-array like object.-
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
-
-
-
-
Method Detail
-
newNumberVector
public DoubleVector newNumberVector(double[] values)
Description copied from interface:NumberVector.Factory
Returns a new NumberVector of N for the given values.- Specified by:
newNumberVector
in interfaceNumberVector.Factory<DoubleVector>
- Parameters:
values
- the values of the NumberVector- Returns:
- a new NumberVector of N for the given values
-
newFeatureVector
public <A> DoubleVector 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<DoubleVector,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> DoubleVector 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<DoubleVector>
- Type Parameters:
A
- Array type- Parameters:
array
- Arrayadapter
- Adapter- Returns:
- a new NumberVector of N for the given values.
-
getDefaultSerializer
public ByteBufferSerializer<DoubleVector> 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<DoubleVector,java.lang.Number>
- Returns:
- Serializer
-
getRestrictionClass
public java.lang.Class<? super DoubleVector> getRestrictionClass()
Description copied from interface:FeatureVector.Factory
Get the objects type restriction.- Specified by:
getRestrictionClass
in interfaceFeatureVector.Factory<DoubleVector,java.lang.Number>
- Returns:
- Restriction class
-
-