Class AbstractSmoother<T extends DataContainer>

    • Constructor Detail

      • AbstractSmoother

        public AbstractSmoother()
    • Method Detail

      • reset

        protected void reset()
        Resets the smoothing scheme (but does not clear the input data!). Derived classes must call this method in set-methods of parameters to assure the invalidation of previously generated data.
        Overrides:
        reset in class AbstractOptionHandler
      • cleanUp

        public void cleanUp()
        Cleans up data structures, frees up memory. Sets the input data to null.
        Specified by:
        cleanUp in interface CleanUpHandler
      • smooth

        public T smooth​(T data)
        Returns the smoothed data, smooths the original data first if necessary.
        Parameters:
        data - the data to smooth
        Returns:
        the smoothed data
      • checkData

        protected void checkData​(T data)
        The default implementation only checks whether there is any data set.
        Parameters:
        data - the data to check
      • processData

        protected abstract T processData​(T data)
        Performs the actual smoothing.
        Parameters:
        data - the to smooth
        Returns:
        the smoothed data
      • compareTo

        public int compareTo​(Object o)
        Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

        Only compares the commandlines of the two objects.
        Specified by:
        compareTo in interface Comparable<T extends DataContainer>
        Parameters:
        o - the object to be compared.
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        Throws:
        ClassCastException - if the specified object's type prevents it from being compared to this object.
      • equals

        public boolean equals​(Object o)
        Returns whether the two objects are the same.

        Only compares the commandlines of the two objects.
        Overrides:
        equals in class Object
        Parameters:
        o - the object to be compared
        Returns:
        true if the object is the same as this one
      • shallowCopy

        public AbstractSmoother shallowCopy​(boolean expand)
        Returns a shallow copy of itself, i.e., based on the commandline options.
        Specified by:
        shallowCopy in interface ShallowCopySupporter<T extends DataContainer>
        Parameters:
        expand - whether to expand variables to their current values
        Returns:
        the shallow copy
      • getSmoothers

        public static String[] getSmoothers()
        Returns a list with classnames of smoothing schemes.
        Returns:
        the smoothing scheme classnames
      • forName

        public static AbstractSmoother forName​(String classname,
                                               String[] options)
        Instantiates the smoothing scheme with the given options.
        Parameters:
        classname - the classname of the smoothing scheme to instantiate
        options - the options for the smoothing scheme
        Returns:
        the instantiated smoothing scheme or null if an error occurred
      • forCommandLine

        public static AbstractSmoother forCommandLine​(String cmdline)
        Instantiates the smoothing scheme from the given commandline (i.e., classname and optional options).
        Parameters:
        cmdline - the classname (and optional options) of the smoothing scheme to instantiate
        Returns:
        the instantiated smoothing scheme or null if an error occurred