Package nz.org.riskscape.engine.rl.agg
Class ModeAggregationFunction
java.lang.Object
nz.org.riskscape.engine.rl.agg.ListCollecting
nz.org.riskscape.engine.rl.agg.ModeAggregationFunction
- All Implemented Interfaces:
nz.org.riskscape.engine.rl.agg.AggregationFunction
AggregationFunction to find the mode(most observed value).
Should there be many values that qualify as most observed then one of them will be returned as the mode.
-
Nested Class Summary
Nested classes/interfaces inherited from class nz.org.riskscape.engine.rl.agg.ListCollecting
ListCollecting.ListProcessor, ListCollecting.LocalProblems -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ListCollecting.ListProcessorbuildProcessor(nz.org.riskscape.engine.types.RSList listType, nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.engine.types.Type inputType, nz.org.riskscape.rl.ast.FunctionCall fc) Build aListCollecting.ListProcessorthat can produce the aggregated result.Methods inherited from class nz.org.riskscape.engine.rl.agg.ListCollecting
realizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nz.org.riskscape.engine.rl.agg.AggregationFunction
getArguments, getReturnType
-
Constructor Details
-
ModeAggregationFunction
public ModeAggregationFunction()
-
-
Method Details
-
buildProcessor
protected ListCollecting.ListProcessor buildProcessor(nz.org.riskscape.engine.types.RSList listType, nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.engine.types.Type inputType, nz.org.riskscape.rl.ast.FunctionCall fc) throws nz.org.riskscape.problem.ProblemException Description copied from class:ListCollectingBuild a
ListCollecting.ListProcessorthat can produce the aggregated result.- Specified by:
buildProcessorin classListCollecting- Parameters:
listType- type of the list that will be passed to built processorcontext- context to realize any other expressions with- Returns:
- list processor to capable of producing aggregated result
- Throws:
nz.org.riskscape.problem.ProblemException- with any problems encountered
-