Class HillClimber.Adaptation
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.simulator.policy.sketch.climbing.HillClimber.Adaptation
-
- Enclosing interface:
- HillClimber
public static final class HillClimber.Adaptation extends Object
The adaptation type and its magnitude.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHillClimber.Adaptation.Type
-
Field Summary
Fields Modifier and Type Field Description doubleamountHillClimber.Adaptation.Typetype
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HillClimber.AdaptationadaptBy(double amount)Returns the adaption based on the amount, where a negative value decreases the window.static HillClimber.AdaptationdecreaseWindow(double amount)static HillClimber.Adaptationhold()static HillClimber.AdaptationincreaseWindow(double amount)static introundToInt(double amount)StringtoString()
-
-
-
Field Detail
-
amount
public final double amount
-
type
public final HillClimber.Adaptation.Type type
-
-
Method Detail
-
adaptBy
public static HillClimber.Adaptation adaptBy(double amount)
Returns the adaption based on the amount, where a negative value decreases the window.
-
roundToInt
public static int roundToInt(double amount)
-
hold
public static HillClimber.Adaptation hold()
-
increaseWindow
public static HillClimber.Adaptation increaseWindow(double amount)
-
decreaseWindow
public static HillClimber.Adaptation decreaseWindow(double amount)
-
-