Class DiSH.Instance

    • Constructor Detail

      • Instance

        public Instance​(Relation<? extends NumberVector> relation)
        Constructor.
        Parameters:
        relation - Relation
    • Method Detail

      • determinePreferenceVector

        private long[] determinePreferenceVector​(ModifiableDBIDs[] neighborIDs,
                                                 java.lang.StringBuilder msg)
        Determines the preference vector according to the specified neighbor ids.
        Parameters:
        neighborIDs - the list of ids of the neighbors in each dimension
        msg - a string buffer for debug messages
        Returns:
        the preference vector
      • determinePreferenceVectorByApriori

        private long[] determinePreferenceVectorByApriori​(ModifiableDBIDs[] neighborIDs,
                                                          java.lang.StringBuilder msg)
        Determines the preference vector with the apriori strategy.
        Parameters:
        neighborIDs - the list of ids of the neighbors in each dimension
        msg - a string buffer for debug messages
        Returns:
        the preference vector
      • determinePreferenceVectorByMaxIntersection

        private long[] determinePreferenceVectorByMaxIntersection​(ModifiableDBIDs[] neighborIDs,
                                                                  java.lang.StringBuilder msg)
        Determines the preference vector with the max intersection strategy.
        Parameters:
        neighborIDs - the list of ids of the neighbors in each dimension
        msg - a string buffer for debug messages
        Returns:
        the preference vector
      • max

        private int max​(java.util.Map<java.lang.Integer,​ModifiableDBIDs> candidates)
        Returns the set with the maximum size contained in the specified map.
        Parameters:
        candidates - the map containing the sets
        Returns:
        the set with the maximum size
      • maxIntersection

        private int maxIntersection​(java.util.Map<java.lang.Integer,​ModifiableDBIDs> candidates,
                                    ModifiableDBIDs set)
        Returns the index of the set having the maximum intersection set with the specified set contained in the specified map.
        Parameters:
        candidates - the map containing the sets
        set - the set to intersect with and output the result to
        Returns:
        the set with the maximum size