Interface ICountFingerprint

  • All Superinterfaces:
    Serializable
    All Known Implementing Classes:
    IntArrayCountFingerprint

    public interface ICountFingerprint
    extends Serializable
    Interface for count fingerprint representations. The fingerprint is regarded as a list of hashes and a list of counts where the the list of counts keeps track of how many times the corresponding hash is found in the fingerprint. So index refers to position in the list. The list must be sorted in natural order (ascending).
    Author:
    jonalv
    Source code:
    main
    Belongs to CDK module:
    core
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int getCount​(int index)
      Returns the count value for the bin with the given index.
      int getCountForHash​(int hash)
      Get the number of times a certain hash exists in the fingerprint.
      int getHash​(int index)
      Returns the hash corresponding to the given index in the fingerprint.
      boolean hasHash​(int hash)
      Whether the fingerprint contains the given hash.
      void merge​(ICountFingerprint fp)
      Merge all from fp into the current fingerprint.
      int numOfPopulatedbins()
      Returns the number of bins that are populated.
      void setBehaveAsBitFingerprint​(boolean behaveAsBitFingerprint)
      Changes behaviour, if true is given the count fingerprint will behave as a bit fingerprint and return 0 or 1 for counts.
      long size()
      Returns the number of bits of this fingerprint.
    • Method Detail

      • size

        long size()
        Returns the number of bits of this fingerprint.
        Returns:
        the size of the fingerprint.
      • numOfPopulatedbins

        int numOfPopulatedbins()
        Returns the number of bins that are populated. This number is typically smaller then the total number of bins.
        Returns:
        the number of populated bins
        See Also:
        size()
      • getCount

        int getCount​(int index)
        Returns the count value for the bin with the given index.
        Parameters:
        index - the index of the bin to return the number of hits for.
        Returns:
        the count for the bin with given index.
      • getHash

        int getHash​(int index)
        Returns the hash corresponding to the given index in the fingerprint.
        Parameters:
        index - the index of the bin to return the hash for.
        Returns:
        the hash for the bin with the given index.
      • merge

        void merge​(ICountFingerprint fp)
        Merge all from fp into the current fingerprint.
        Parameters:
        fp - to be merged
      • setBehaveAsBitFingerprint

        void setBehaveAsBitFingerprint​(boolean behaveAsBitFingerprint)
        Changes behaviour, if true is given the count fingerprint will behave as a bit fingerprint and return 0 or 1 for counts.
        Parameters:
        behaveAsBitFingerprint -
      • hasHash

        boolean hasHash​(int hash)
        Whether the fingerprint contains the given hash.
        Parameters:
        hash -
        Returns:
        true if the fingerprint contains the given hash, otherwise false.
      • getCountForHash

        int getCountForHash​(int hash)
        Get the number of times a certain hash exists in the fingerprint.
        Parameters:
        hash -
        Returns:
        the number associated with the given hash