public class ScaledBytesFvExtractor extends Object implements UnguardedExtractor<FloatVectorDescriptor,Serializable>
byte []
representation from ScaledBytesFloatVectorDescriptorImpl
.
Note that this implementation might return the internal representation of the descriptor!
Guarded.EnsureThat, Guarded.New
Constructor and Description |
---|
ScaledBytesFvExtractor(int length,
Object guardObj)
Construct.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
apply(FloatVectorDescriptor input) |
boolean |
extractorIsEqualWith(UnguardedExtractor other)
Check strict equivalence of extractors.
|
Object |
getGuardObject()
Gets the guard object associated to the generated descriptors/utilities.
|
String |
toString() |
public ScaledBytesFvExtractor(int length, Object guardObj)
length
- LengthguardObj
- Associated guard objectpublic byte[] apply(FloatVectorDescriptor input)
apply
in interface Function<FloatVectorDescriptor,Serializable>
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
.public boolean extractorIsEqualWith(UnguardedExtractor other)
UnguardedExtractor
extractorIsEqualWith
in interface UnguardedExtractor<FloatVectorDescriptor,Serializable>
other
- Other extractortrue
when and only when the two extractors (this
and other
) are the same thus
interchangeable. Implementations typically check class equivalence, guard object match and parameter match.