Class ApplyAveragingFormula
java.lang.Object
cdm.observable.asset.calculatedrate.functions.ApplyAveragingFormula
- All Implemented Interfaces:
com.rosetta.model.lib.functions.RosettaFunction
- Direct Known Subclasses:
ApplyAveragingFormula.ApplyAveragingFormulaDefault
public abstract class ApplyAveragingFormula
extends Object
implements com.rosetta.model.lib.functions.RosettaFunction
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.rosetta.model.lib.functions.ModelObjectValidatorprotected VectorOperation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract com.rosetta.model.lib.mapper.MapperS<BigDecimal> calculatedRate(List<BigDecimal> observations, List<BigDecimal> weights) protected abstract CalculatedRateDetails.CalculatedRateDetailsBuilderdoEvaluate(List<BigDecimal> observations, List<BigDecimal> weights) evaluate(List<BigDecimal> observations, List<BigDecimal> weights) protected abstract com.rosetta.model.lib.mapper.MapperS<BigDecimal> totalWeight(List<BigDecimal> observations, List<BigDecimal> weights) protected abstract com.rosetta.model.lib.mapper.MapperS<BigDecimal> totalWeightedObservations(List<BigDecimal> observations, List<BigDecimal> weights) protected abstract com.rosetta.model.lib.mapper.MapperC<BigDecimal> weightedObservations(List<BigDecimal> observations, List<BigDecimal> weights) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.rosetta.model.lib.functions.RosettaFunction
toBuilder, toBuilder, toBuilder
-
Field Details
-
objectValidator
@Inject protected com.rosetta.model.lib.functions.ModelObjectValidator objectValidator -
vectorOperation
-
-
Constructor Details
-
ApplyAveragingFormula
public ApplyAveragingFormula()
-
-
Method Details
-
evaluate
- Parameters:
observations- a vector of observation value.weights- a vector of weights (should be same size as observations, 1 weight per observation.- Returns:
- results Details of the averaging calculation.
-
doEvaluate
protected abstract CalculatedRateDetails.CalculatedRateDetailsBuilder doEvaluate(List<BigDecimal> observations, List<BigDecimal> weights) -
weightedObservations
protected abstract com.rosetta.model.lib.mapper.MapperC<BigDecimal> weightedObservations(List<BigDecimal> observations, List<BigDecimal> weights) -
totalWeightedObservations
protected abstract com.rosetta.model.lib.mapper.MapperS<BigDecimal> totalWeightedObservations(List<BigDecimal> observations, List<BigDecimal> weights) -
totalWeight
protected abstract com.rosetta.model.lib.mapper.MapperS<BigDecimal> totalWeight(List<BigDecimal> observations, List<BigDecimal> weights) -
calculatedRate
protected abstract com.rosetta.model.lib.mapper.MapperS<BigDecimal> calculatedRate(List<BigDecimal> observations, List<BigDecimal> weights)
-