Class Expression


public class Expression extends AbstractAggregation
Author:
tim
  • Field Details

    • NORMALIZED_PREFIX

      public static final String NORMALIZED_PREFIX
      A prefix to address an already normalized criterion ("normalized_").
      See Also:
    • WEIGHTED_PREFIX

      public static final String WEIGHTED_PREFIX
      A prefix to address a variable with the already included weight. ("weighted_").
      See Also:
    • WEIGHT_OF_PREFIX

      public static final String WEIGHT_OF_PREFIX
      A prefix to address the weight of a variable. ("weightOf_").
      See Also:
  • Constructor Details

    • Expression

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

    • importFromXML

      public void importFromXML(org.jdom2.Element _masterNode)
      Description copied from class: AbstractAggregation
      Imports the data from a specified element
      Overrides:
      importFromXML in class AbstractAggregation
    • 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
      Overrides:
      exportToXML in class AbstractAggregation
      Returns:
      the master node where the data structure values are anchored
    • aggregateAll

      protected double aggregateAll(Alternative _alternative, ArrayList<Criterion> _criteria, Weighting _weighting)
      Description copied from class: AbstractAggregation
      Delegated method to subclass for doing a full aggregation on the complete set of criteria for a given alternative.
      Specified by:
      aggregateAll in class AbstractAggregation
      Parameters:
      _alternative - the alternative to aggregate for
      _criteria - the list of all criteria
      _weighting - the weighting for the criteria
      Returns:
      the full aggregation value
    • aggregateGroup

      protected double aggregateGroup(Alternative _alternative, CriterionGroup _group, ArrayList<Criterion> _criteria, Weighting _weighting)
      Expression aggregation does not work for groups in general.
      Specified by:
      aggregateGroup in class AbstractAggregation
      Parameters:
      _alternative -
      _group -
      _criteria -
      _weighting -
      Returns:
    • aggregateSingle

      protected double aggregateSingle(Alternative _alternative, Criterion _criterion, ArrayList<Criterion> _criteria, Weighting _weighting)
      Description copied from class: AbstractAggregation
      Delegated method to subclass for determining the aggregation value of a single criterion for a given alternative. The aggregation is done in respect to the aggregation of the full set e.g. in respect to the overall maximum.
      Specified by:
      aggregateSingle in class AbstractAggregation
      Parameters:
      _alternative - the alternative to aggregate for
      _criterion - the criterion to determine the aggregation value for
      _criteria - the list of all criteria
      _weighting - the weighting for the criteria
      Returns:
      the single aggregation value
    • fixVariableName

      public static String fixVariableName(String _variableName)
    • getExpression

      public String getExpression()
    • setExpression

      public void setExpression(String _expression)
    • getHighestTier

      public int getHighestTier()
      Description copied from class: AbstractAggregation
      Get the highest tier for which tierwise information is available. Weighted sum provides information for any tier, TOPSIS and weighted product only for the lowest tier 0.
      Specified by:
      getHighestTier in class AbstractAggregation
      Returns:
      the highest tier for which tierwise information is available