Interface BinaryVectorDescriptor

  • All Superinterfaces:
    Descriptor, Guarded, Serializable
    All Known Subinterfaces:
    Cfp, Ecfp, Maccs

    @Beta
    @PublicAPI
    public interface BinaryVectorDescriptor
    extends Descriptor
    BinaryVectorDescriptor is a Descriptor 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.

    • 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.