public class FloatVectorDescriptorImpl extends Object implements FloatVectorDescriptor
Guarded.EnsureThat, Guarded.New
Constructor and Description |
---|
FloatVectorDescriptorImpl(byte[] serialized,
Object guardObject)
Deprecated.
use
FloatVectorDescriptorImpl(byte[], java.lang.Object, int) with explicit expected vector length instead |
FloatVectorDescriptorImpl(byte[] serialized,
Object guardObject,
int length)
Construct from serialized form.
|
FloatVectorDescriptorImpl(float[] fp,
Object guardObject)
Deprecated.
Use
FloatVectorDescriptorImpl(float[], Object, int) with
explicit expected vector length parameter |
FloatVectorDescriptorImpl(float[] fp,
Object guardObject,
int length)
Construct new instance.
|
FloatVectorDescriptorImpl(String decimalString,
Object guardObject)
Deprecated.
Use
FloatVectorDescriptorImpl(java.lang.String, Object, int)
with explicit expected vector length instead |
FloatVectorDescriptorImpl(String decimalString,
Object guardObject,
int length)
Construct from decimal String representation.
|
Modifier and Type | Method and Description |
---|---|
double |
getEuclideanNorm()
Euclidean norm of the represented vector.
|
float[] |
getFP()
Gets the float array representation of the fingerprint.
|
Object |
getGuardObject()
Gets the guard object associated to the generated descriptors/utilities.
|
double |
getManhattanNorm()
Manhattan norm of the represented vector.
|
double |
getMaximumNorm()
Maximum norm of the represented vector.
|
byte[] |
serialize()
Create serialized byte array representation.
|
String |
toDecimalString()
Converts the fingerprints float array representation into a tab separated string.
|
@Deprecated public FloatVectorDescriptorImpl(float[] fp, Object guardObject)
FloatVectorDescriptorImpl(float[], Object, int)
with
explicit expected vector length parameterfp
- float representationguardObject
- associated guardpublic FloatVectorDescriptorImpl(float[] fp, Object guardObject, int length)
fp
- float representationguardObject
- associated generatorlength
- Expected descriptor length@Deprecated public FloatVectorDescriptorImpl(byte[] serialized, Object guardObject)
FloatVectorDescriptorImpl(byte[], java.lang.Object, int)
with explicit expected vector length insteadserialized
- serialized formguardObject
- associated guard objectpublic FloatVectorDescriptorImpl(byte[] serialized, Object guardObject, int length)
serialized
- serialized formguardObject
- associated guard objectlength
- Expected descriptor length@Deprecated public FloatVectorDescriptorImpl(String decimalString, Object guardObject)
FloatVectorDescriptorImpl(java.lang.String, Object, int)
with explicit expected vector length insteaddecimalString
- decimal String representationguardObject
- associated guard objectpublic float[] getFP()
FloatVectorDescriptor
The returned array might be the the internal representation array so changing the values is forbidden. Please note that this behavior is not guaranteed, the returned array can be a non cached copy of the represented vector generated on every invocation.
getFP
in interface FloatVectorDescriptor
public byte[] serialize()
public String toDecimalString()
public double getEuclideanNorm()
FloatVectorDescriptor
Note that the actual implementation might or might not cache the returned value.
getEuclideanNorm
in interface FloatVectorDescriptor
public double getManhattanNorm()
FloatVectorDescriptor
Note that the actual implementation might or might not cache the returned value.
getManhattanNorm
in interface FloatVectorDescriptor
public double getMaximumNorm()
FloatVectorDescriptor
Note that the actual implementation might or might not cache the returned value.
getMaximumNorm
in interface FloatVectorDescriptor
public Object getGuardObject()
Guarded
This method is intended to use only for ensuring the compatibility of manipulated objects.
Implementations might use the associated DescriptorGenerator
or DescriptorParameters
reference as
the guard object, however it is a non recommended practice to use this method to access the associated generator
to perform further operations on it.
getGuardObject
in interface Guarded
null
.