public class BinaryLongFpExtractor extends Object implements UnguardedExtractor<BinaryVectorDescriptor,long[]>
long []
binary fp from a BinaryVectorDescriptor
.
Note that this implementation might return the internal representation of the descriptor!
Guarded.EnsureThat, Guarded.New
Constructor and Description |
---|
BinaryLongFpExtractor(int length,
Object guardObj)
Construct.
|
Modifier and Type | Method and Description |
---|---|
long[] |
apply(BinaryVectorDescriptor 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 BinaryLongFpExtractor(int length, Object guardObj)
length
- Expected length in bitsguardObj
- Guard object to checkpublic long[] apply(BinaryVectorDescriptor input)
apply
in interface Function<BinaryVectorDescriptor,long[]>
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<BinaryVectorDescriptor,long[]>
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.