Package edu.kit.mcda.core.aggregation
Class AbstractAggregation
java.lang.Object
edu.kit.mcda.core.aggregation.AbstractAggregation
- Direct Known Subclasses:
Expression
,Maximum
,Minimum
,Promethee
,Topsis
,WeightedProduct
,WeightedRanked
,WeightedSum
- Author:
- tim
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract 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 abstract double
aggregateGroup
(Alternative _alternative, CriterionGroup _group, ArrayList<Criterion> _criteria, Weighting _weighting) Delegated method to subclass for doing an aggregation limited to the group for a given alternative.protected abstract 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.double
doAggregateAll
(Alternative _alternative, ArrayList<Criterion> _criteria, Weighting _weighting) Do a full aggregation on the complete set of criteria for a given alternative.double
doAggregateGroup
(Alternative _alternative, CriterionGroup _group, ArrayList<Criterion> _criteria, Weighting _weighting) Do an aggregation limited to the group for a given alternative.double
doAggregateSingle
(Alternative _alternative, Criterion _criterion, ArrayList<Criterion> _criteria, Weighting _weighting) Do determine the aggregation value of a single criterion for a given alternative.org.jdom2.Element
Exports the data to a XML node.abstract int
Get the highest tier for which tierwise information is available.static String
Get the tag of the master node of a data structure.protected double
getWeightedNormalized
(Alternative _alternative, Criterion _criterion, Weighting _weighting) For convenience shortcut to get the weighted normalized value of a criterion for a given alternative.void
importFromXML
(org.jdom2.Element _element) Imports the data from a specified elementboolean
isType
(Class<? extends AbstractAggregation> _aggregatorClass)
-
Constructor Details
-
AbstractAggregation
public AbstractAggregation()Beanstyle constructor of AbstractAggregation. No parameters required. Calls preInit(), init() and postInit();
-
-
Method Details
-
getNodeTag
Get the tag of the master node of a data structure.- Returns:
- the master nodes tag
-
importFromXML
public void importFromXML(org.jdom2.Element _element) Imports the data from a specified element- Parameters:
_element
-
-
exportToXML
public org.jdom2.Element exportToXML()Exports the data to a XML node.- Returns:
- the element
-
getWeightedNormalized
protected double getWeightedNormalized(Alternative _alternative, Criterion _criterion, Weighting _weighting) For convenience shortcut to get the weighted normalized value of a criterion for a given alternative.- Parameters:
_alternative
- the alternative to aggregate for_criterion
- the criterion to determine the aggregation value for_weighting
- the weighting for the criteria- Returns:
- the weighted normalized value
-
doAggregateAll
public double doAggregateAll(Alternative _alternative, ArrayList<Criterion> _criteria, Weighting _weighting) Do a full aggregation on the complete set of criteria for a given alternative.- Parameters:
_alternative
- the alternative to aggregate for_criteria
- the list of all criteria_weighting
- the weighting for the criteria- Returns:
- the full aggregation value
-
doAggregateGroup
public double doAggregateGroup(Alternative _alternative, CriterionGroup _group, ArrayList<Criterion> _criteria, Weighting _weighting) Do an aggregation limited to the group 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.- Parameters:
_alternative
- the alternative to aggregate for_group
- the group the aggregation is limited to_criteria
- the list of all criteria_weighting
- the weighting for the criteria- Returns:
- the aggregation value of the group
-
doAggregateSingle
public double doAggregateSingle(Alternative _alternative, Criterion _criterion, ArrayList<Criterion> _criteria, Weighting _weighting) Do determine 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.- 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
-
aggregateAll
protected abstract 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.- 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 abstract double aggregateGroup(Alternative _alternative, CriterionGroup _group, ArrayList<Criterion> _criteria, Weighting _weighting) Delegated method to subclass for doing an aggregation limited to the group 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.- Parameters:
_alternative
- the alternative to aggregate for_group
- the group the aggregation is limited to_criteria
- the list of all criteria_weighting
- the weighting for the criteria- Returns:
- the full aggregation value
-
aggregateSingle
protected abstract 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. The aggregation is done in respect to the aggregation of the full set e.g. in respect to the overall maximum.- 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
-
isType
-
getHighestTier
public abstract int getHighestTier()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.- Returns:
- the highest tier for which tierwise information is available
-