Class ADictionary

    • Constructor Detail

      • ADictionary

        public ADictionary()
    • Method Detail

      • clone

        public abstract IDictionary clone()
        Description copied from interface: IDictionary
        Returns a deep clone of the dictionary.
        Specified by:
        clone in interface IDictionary
        Returns:
        A deep clone
      • centralMoment

        public final CM_COV_Object centralMoment​(ValueFunction fn,
                                                 int[] counts,
                                                 int nRows)
        Description copied from interface: IDictionary
        Central moment function to calculate the central moment of this column group. MUST be on a single column dictionary.
        Specified by:
        centralMoment in interface IDictionary
        Parameters:
        fn - The value function to apply
        counts - The weight of individual tuples
        nRows - The number of rows in total of the column group
        Returns:
        The central moment Object
      • centralMomentWithDefault

        public final CM_COV_Object centralMomentWithDefault​(ValueFunction fn,
                                                            int[] counts,
                                                            double def,
                                                            int nRows)
        Description copied from interface: IDictionary
        Central moment function to calculate the central moment of this column group with a default offset on all missing tuples. MUST be on a single column dictionary.
        Specified by:
        centralMomentWithDefault in interface IDictionary
        Parameters:
        fn - The value function to apply
        counts - The weight of individual tuples
        def - The default values to offset the tuples with
        nRows - The number of rows in total of the column group
        Returns:
        The central moment Object
      • centralMomentWithReference

        public final CM_COV_Object centralMomentWithReference​(ValueFunction fn,
                                                              int[] counts,
                                                              double reference,
                                                              int nRows)
        Description copied from interface: IDictionary
        Central moment function to calculate the central moment of this column group with a reference offset on each tuple. MUST be on a single column dictionary.
        Specified by:
        centralMomentWithReference in interface IDictionary
        Parameters:
        fn - The value function to apply
        counts - The weight of individual tuples
        reference - The reference values to offset the tuples with
        nRows - The number of rows in total of the column group
        Returns:
        The central moment Object
      • equals

        public final boolean equals​(Object o)
        Description copied from interface: IDictionary
        Indicate if this object is equal to another this takes into part sematic equivalence
        Specified by:
        equals in interface IDictionary
        Overrides:
        equals in class Object
        Parameters:
        o - The other object
        Returns:
        If they are equal
      • equals

        public final boolean equals​(double[] v)
        Description copied from interface: IDictionary
        Indicate if this object is equal to the given array of doubles.
        Specified by:
        equals in interface IDictionary
        Parameters:
        v - The list of double values
        Returns:
        If they are equal to this.
      • doubleToString

        public static String doubleToString​(double v)
        Make a double into a string, if the double is a whole number then return it without decimal points
        Parameters:
        v - The value
        Returns:
        The string
      • correctNan

        public static void correctNan​(double[] res,
                                      IColIndex colIndexes)
        Correct Nan Values in an result. If there are any NaN values in the given Res then they are replaced with 0.
        Parameters:
        res - The array to correct
        colIndexes - The column indexes.