Package samer.functions
Class HybridFunction
- java.lang.Object
-
- samer.maths.Function
-
- samer.functions.HybridFunction
-
public class HybridFunction extends Function
Piecewise function made of two other functions, f and g. If argument>threshold, return g(t), otherwise return f(t) Implements double model for setting the threshold or cross-over point, which defaults to zero.
-
-
Constructor Summary
Constructors Constructor and Description HybridFunction(Function f, Function g)
HybridFunction(Function f, Function g, double th)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double
apply(double t)
Function
derivative()
void
dispose()
java.lang.String
format(java.lang.String arg)
double
get()
DoubleModel implementation: get crossover pointvoid
set(double t)
DoubleModel implementation: set crossover point
-
-
-
Method Detail
-
set
public void set(double t)
DoubleModel implementation: set crossover point
-
get
public double get()
DoubleModel implementation: get crossover point
-
derivative
public Function derivative()
- Overrides:
derivative
in classFunction
-
-