Class BinaryVectorComparator.Util

  • Enclosing interface:
    BinaryVectorComparator

    @Beta
    public static class BinaryVectorComparator.Util
    extends Object
    Simple consistency check utility.
    • Constructor Detail

      • Util

        public Util()
    • Method Detail

      • checkBitCounts

        public static void checkBitCounts​(int bitCount,
                                          int targetOnly,
                                          int queryOnly,
                                          int common)
                                   throws IllegalArgumentException
        Check that descriptor comparison parameters are consistent.
        Parameters:
        bitCount - Descriptor size
        targetOnly - Count of positions set in the target side only
        queryOnly - Count of positions set in the query side only
        common - Count of positions set both in the query and target side
        Throws:
        IllegalArgumentException - When the four given counts are inconsistent or invalid