Class AutoSoftmax

java.lang.Object
edu.kit.mcda.core.normalization.AbstractNormalization
edu.kit.mcda.core.normalization.AutoSoftmax
All Implemented Interfaces:
DomainBounds, Gain, Invertible

public class AutoSoftmax extends AbstractNormalization implements DomainBounds, Gain, Invertible
A linear normalisation of values with bounds taken from automatically computed bounds. The values are normalised according to the minimum and maximum of values of the specified criterion.
Author:
Tim Mueller
  • Constructor Details

    • AutoSoftmax

      public AutoSoftmax()
      Beanstyle constructor of AbstractNormalizeFunction. No parameters required. Calls preInit(), init() and postInit();
  • Method Details

    • clone

      public AbstractNormalization clone()
      Specified by:
      clone in class AbstractNormalization
    • importFromXML

      public void importFromXML(org.jdom2.Element _masterNode)
      Description copied from class: AbstractNormalization
      Imports the normalisation parameters from a specified XML node.
      Specified by:
      importFromXML in class AbstractNormalization
      Parameters:
      _masterNode - the XML node to import the paramters from
    • exportToXML

      public org.jdom2.Element exportToXML()
      Export data structure to a XML node. Missing data, see class javadoc for details Returns null if an error occured during export
      Specified by:
      exportToXML in class AbstractNormalization
      Returns:
      the master node where the data structure values are anchored
    • hasAutoBounds

      public boolean hasAutoBounds()
      Description copied from interface: DomainBounds
      Whether this domain bounds can be determined automatically or not.
      Specified by:
      hasAutoBounds in interface DomainBounds
      Returns:
      true if bounds can be automatically determined
    • isAutoMinimum

      public boolean isAutoMinimum()
      Specified by:
      isAutoMinimum in interface DomainBounds
      Returns:
    • setAutoMinimum

      public void setAutoMinimum(boolean autoMinimum)
      Specified by:
      setAutoMinimum in interface DomainBounds
      Parameters:
      autoMinimum - the autoMinimum to set
    • isAutoMaximum

      public boolean isAutoMaximum()
      Specified by:
      isAutoMaximum in interface DomainBounds
      Returns:
      the autoMaximum
    • setAutoMaximum

      public void setAutoMaximum(boolean autoMaximum)
      Specified by:
      setAutoMaximum in interface DomainBounds
      Parameters:
      autoMaximum - the autoMaximum to set
    • isInverse

      public boolean isInverse()
      Specified by:
      isInverse in interface Invertible
      Returns:
      the inverse
    • setInverse

      public void setInverse(boolean _inverse)
      Specified by:
      setInverse in interface Invertible
      Parameters:
      _inverse - the inverse to set
    • getGain

      public Gain.Type getGain()
      Description copied from interface: Gain
      Get the type of the gain.
      Specified by:
      getGain in interface Gain
      Returns:
      the type of this gain
    • setGain

      public void setGain(Gain.Type _gain)
      Description copied from interface: Gain
      Set the type of the gain.
      Specified by:
      setGain in interface Gain
      Parameters:
      _gain - the type to set
    • getDomainMinimum

      public double getDomainMinimum()
      Description copied from interface: DomainBounds
      Get the lower bound of the domain.
      Specified by:
      getDomainMinimum in interface DomainBounds
      Returns:
      the minimum
    • getDomainMaximum

      public double getDomainMaximum()
      Description copied from interface: DomainBounds
      Get the upper bound of the domain.
      Specified by:
      getDomainMaximum in interface DomainBounds
      Returns:
      the maximum
    • setDomainBounds

      public boolean setDomainBounds(double _minimum, double _maximum)
      Description copied from interface: DomainBounds
      Set the domain bounds. Both values are set synchronous to allow consistency checks.
      Specified by:
      setDomainBounds in interface DomainBounds
      Parameters:
      _minimum - the lower domain bound to be set
      _maximum - the upper domain bound to be set
      Returns:
      true if the domain bounds are valid, false otherwise
    • normalize

      public double normalize(Criterion _criterion, double _value)
      Description copied from class: AbstractNormalization
      Normalize a single values according to the values contained in the passed criterion.
      Specified by:
      normalize in class AbstractNormalization
      Parameters:
      _criterion - the criterion which is referred to for normalisation
      _value - the value to be normalised
      Returns:
      the normalised value according to the the values of the criterion
    • updateDomainRange

      public void updateDomainRange(Criterion _criterion)
    • getDomainRange

      public double[] getDomainRange(Criterion _criterion)
      Description copied from class: AbstractNormalization
      Get the actual range of the domain to which the values are normalised. This is sometimes explicitly set and sometimes computed from the criteria values themselves.
      Specified by:
      getDomainRange in class AbstractNormalization
      Parameters:
      _criterion - the criterion for which the domain range is requested
      Returns:
      an array containing the lower and upper bound of the domain