Package net.sf.tweety.math.func
Class SmoothingFunction
- java.lang.Object
-
- net.sf.tweety.math.func.SmoothingFunction
-
- All Implemented Interfaces:
BinaryFunction<java.lang.Double,java.lang.Double,java.lang.Double>
public class SmoothingFunction extends java.lang.Object implements BinaryFunction<java.lang.Double,java.lang.Double,java.lang.Double>
A function that smoothes two values with a smooting factor, i.e. given a smoothing factor X and two values y1, y2 it returns X * y1 + (1-X) * y2.- Author:
- Matthias Thimm
-
-
Field Summary
Fields Modifier and Type Field Description private doublefactorThe smoothing factor.
-
Constructor Summary
Constructors Constructor Description SmoothingFunction(double factor)Creates a new smoothing function with the given factor.
-
Method Summary
Modifier and Type Method Description java.lang.Doubleeval(java.lang.Double val1, java.lang.Double val2)Evaluates the function for the given elements.
-
-
-
Method Detail
-
eval
public java.lang.Double eval(java.lang.Double val1, java.lang.Double val2)Description copied from interface:BinaryFunctionEvaluates the function for the given elements.- Specified by:
evalin interfaceBinaryFunction<java.lang.Double,java.lang.Double,java.lang.Double>- Parameters:
val1- some elementval2- some element- Returns:
- the value of the element.
-
-