Package cern.accsoft.steering.aloha.calc
Class NoiseWeighterImpl
- java.lang.Object
-
- cern.accsoft.steering.aloha.calc.NoiseWeighterImpl
-
- All Implemented Interfaces:
NoiseWeighter,NoiseWeighterConfig
public class NoiseWeighterImpl extends java.lang.Object implements NoiseWeighter, NoiseWeighterConfig
-
-
Constructor Summary
Constructors Constructor Description NoiseWeighterImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublecalcNoisyValue(double value, double noise)calculates the value weighted by the given noise.java.util.List<java.lang.Double>calcNoisyValues(java.util.List<java.lang.Double> values, java.util.List<java.lang.Double> noiseValues)doublegetNoiseLimit()booleanisActiveNoise()voidsetActiveNoise(boolean activeNoise)voidsetNoiseLimit(double noiseLimit)
-
-
-
Method Detail
-
calcNoisyValue
public final double calcNoisyValue(double value, double noise)Description copied from interface:NoiseWeightercalculates the value weighted by the given noise.- Specified by:
calcNoisyValuein interfaceNoiseWeighter- Parameters:
value- the value for which to calculate the noisenoise- the noise for the value- Returns:
- the value weighted by the noise.
-
setActiveNoise
public void setActiveNoise(boolean activeNoise)
- Specified by:
setActiveNoisein interfaceNoiseWeighterConfig- Parameters:
activeNoise- the activeNoise to set
-
isActiveNoise
public boolean isActiveNoise()
- Specified by:
isActiveNoisein interfaceNoiseWeighter- Specified by:
isActiveNoisein interfaceNoiseWeighterConfig- Returns:
- the activeNoise
-
setNoiseLimit
public void setNoiseLimit(double noiseLimit)
- Specified by:
setNoiseLimitin interfaceNoiseWeighterConfig- Parameters:
noiseLimit- the noiseLimit to set
-
getNoiseLimit
public double getNoiseLimit()
- Specified by:
getNoiseLimitin interfaceNoiseWeighterConfig- Returns:
- the noiseLimit
-
calcNoisyValues
public java.util.List<java.lang.Double> calcNoisyValues(java.util.List<java.lang.Double> values, java.util.List<java.lang.Double> noiseValues)- Specified by:
calcNoisyValuesin interfaceNoiseWeighter
-
-