Package edu.kit.mcda.core.aggregation
Class Expression
java.lang.Object
edu.kit.mcda.core.aggregation.AbstractAggregation
edu.kit.mcda.core.aggregation.Expression
- Author:
- tim
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected double
aggregateAll
(Alternative _alternative, ArrayList<Criterion> _criteria, Weighting _weighting) Delegated method to subclass for doing a full aggregation on the complete set of criteria for a given alternative.protected double
aggregateGroup
(Alternative _alternative, CriterionGroup _group, ArrayList<Criterion> _criteria, Weighting _weighting) Expression aggregation does not work for groups in general.protected double
aggregateSingle
(Alternative _alternative, Criterion _criterion, ArrayList<Criterion> _criteria, Weighting _weighting) Delegated method to subclass for determining the aggregation value of a single criterion for a given alternative.org.jdom2.Element
Export data structure to a XML node.static String
fixVariableName
(String _variableName) int
Get the highest tier for which tierwise information is available.void
importFromXML
(org.jdom2.Element _masterNode) Imports the data from a specified elementvoid
setExpression
(String _expression) Methods inherited from class edu.kit.mcda.core.aggregation.AbstractAggregation
doAggregateAll, doAggregateGroup, doAggregateSingle, getNodeTag, getWeightedNormalized, isType
-
Field Details
-
NORMALIZED_PREFIX
A prefix to address an already normalized criterion ("normalized_").- See Also:
-
WEIGHTED_PREFIX
A prefix to address a variable with the already included weight. ("weighted_").- See Also:
-
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 classAbstractAggregation
-
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 classAbstractAggregation
- 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 classAbstractAggregation
- 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 classAbstractAggregation
- 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 classAbstractAggregation
- 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
-
getExpression
-
setExpression
-
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 classAbstractAggregation
- Returns:
- the highest tier for which tierwise information is available
-