Interface BinaryVectorDescriptor
-
- All Superinterfaces:
Descriptor
,Guarded
,Serializable
@Beta @PublicAPI public interface BinaryVectorDescriptor extends Descriptor
BinaryVectorDescriptor is aDescriptor
which holds a fixed length binary fingerprint.BinaryVectorDescriptor is a bare form descriptor.
Please note that this interface is marked with
Beta
annotation, so it can be subject of incompatible changes or removal in later releases.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.chemaxon.descriptors.common.Guarded
Guarded.EnsureThat, Guarded.New
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
calculateDarkness()
Calculate the darkness of this fingerprint.int[]
getFP()
Get integer array representation of this fingerprint.BitSet
getFpAsBitset()
Get BitSet representation of this fingerprint.byte[]
getFpAsBytes()
Convert to byte array.long[]
getFpAsLongs()
Get long array representation of this fingerprint.String
toBinaryString()
Convert the fingerprint into a binary string.String
toIntDecimalString()
Converts the fingerprints integer array representation into a tab separated string.String
toLongDecimalString()
Converts the fingerprints long array representation into a tab separated string.-
Methods inherited from interface com.chemaxon.descriptors.common.Guarded
getGuardObject
-
-
-
-
Method Detail
-
getFP
int[] getFP()
Get integer array representation of this fingerprint.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 binary vector generated on every invocation.
- Returns:
- Integer array representation
-
getFpAsLongs
long[] getFpAsLongs()
Get long array representation of this fingerprint.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 binary vector generated on every invocation.
- Returns:
- Long array representation
- Throws:
IllegalStateException
- when the underlying fingerprint length is not multiply of 64 bits.
-
getFpAsBitset
BitSet getFpAsBitset()
Get BitSet representation of this fingerprint.- Returns:
- BitSet representation
-
calculateDarkness
int calculateDarkness()
Calculate the darkness of this fingerprint.Please note that the returned value is not necessarily cached, so the calculation might be executed for multiple consecutive invocations.
- Returns:
- Count of set bits in the fingerprint
-
getFpAsBytes
byte[] getFpAsBytes()
Convert to byte array.- Returns:
- byte array representation
-
toIntDecimalString
String toIntDecimalString()
Converts the fingerprints integer array representation into a tab separated string.- Returns:
- string representation of the fingerprint. The first integer in the returned string is the integer representation arrays first element (with index 0)
-
toLongDecimalString
String toLongDecimalString()
Converts the fingerprints long array representation into a tab separated string.- Returns:
- string representation of the fingerprint. The first long in the returned string is the long representation arrays first element (with index 0)
-
toBinaryString
String toBinaryString()
Convert the fingerprint into a binary string. The first character of the returned string represents the first bit.- Returns:
- Binary string representation.
-
-