public class Range
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable
| Modifier and Type | Field and Description |
|---|---|
int |
id
The id.
|
static int |
maxid
The maxid.
|
static double |
mininimalRange
The Constant mininimalRange.
|
static double |
percent_down
The percent down.
|
static double |
percent_up
The percent up.
|
| Constructor and Description |
|---|
Range(Context context,
double start,
double end,
double extendedrangeatcreation,
boolean start_inclu,
boolean end_inclu,
Percept p)
Instantiates a new range.
|
Range(Range r)
Instantiates a new range.
|
| Modifier and Type | Method and Description |
|---|---|
void |
adapt(Context c,
double oracleValue,
Percept p)
Method called by the context agent.
|
int |
compareTo(java.lang.Object o) |
int |
compareTo(Range i)
Compare to.
|
int |
contains(java.lang.Double d)
Contains.
|
int |
contains(java.lang.Double min,
java.lang.Double max)
Contains.
|
double |
getAlphaFactor()
Gets the alpha factor.
|
double |
getAVTwillToReduce(boolean max)
Gets the AV twill to reduce.
|
Context |
getContext()
Gets the context.
|
double |
getDistanceFromNearestLimit(double d)
Return the distance from given value to the nearest limit.
|
double |
getEnd()
Gets the end.
|
double |
getLenght()
Gets the lenght.
|
boolean |
getNearestLimit(double d)
Gets the nearest limit.
|
double |
getOldValue()
Gets the old value.
|
double |
getStart()
Gets the start.
|
double |
getValue()
Gets the value.
|
boolean |
isEnd_inclu()
Checks if is end inclu.
|
boolean |
isPerceptEnum()
Checks if is percept enum.
|
boolean |
isStart_inclu()
Checks if is start inclu.
|
boolean |
isTooSmall()
Check if the ranges is too small according to strategy.
|
void |
matchBorderWith(Context c)
Match border with.
|
void |
setAlphaFactor(double alphaFactor)
Sets the alpha factor.
|
void |
setContext(Context context)
Sets the context.
|
void |
setEnd_inclu(boolean end_inclu)
Sets the end inclu.
|
void |
setMinimumSize(Percept v)
Sets the minimum size.
|
void |
setOldValue(double oldValue)
Sets the old value.
|
void |
setStart_inclu(boolean start_inclu)
Sets the start inclu.
|
void |
setValue(double value)
Sets the value.
|
double |
simulateNegativeAVTFeedbackMax(double oracleValue)
Simulate negative AVT feedback max.
|
double |
simulateNegativeAVTFeedbackMin(double oracleValue)
Simulate negative AVT feedback min.
|
java.lang.String |
toString() |
public static int maxid
public int id
public static final double mininimalRange
public static double percent_up
public static double percent_down
public Range(Context context, double start, double end, double extendedrangeatcreation, boolean start_inclu, boolean end_inclu, Percept p)
context - the contextstart - the startend - the endextendedrangeatcreation - the extendedrangeatcreationstart_inclu - the start incluend_inclu - the end inclup - the ppublic Range(Range r)
r - the rpublic void adapt(Context c, double oracleValue, Percept p)
c - : the associated Context.oracleValue - the oracle valuep - the ppublic double simulateNegativeAVTFeedbackMin(double oracleValue)
oracleValue - the oracle valuepublic double simulateNegativeAVTFeedbackMax(double oracleValue)
oracleValue - the oracle valuepublic boolean isTooSmall()
public double getOldValue()
public void setOldValue(double oldValue)
oldValue - the new old valuepublic java.lang.String toString()
toString in class java.lang.Objectpublic Context getContext()
public void setContext(Context context)
context - the new contextpublic double getAVTwillToReduce(boolean max)
max - the maxpublic void matchBorderWith(Context c)
c - the cpublic int contains(java.lang.Double d)
d - : the value to testpublic int contains(java.lang.Double min,
java.lang.Double max)
min - the minmax - the maxpublic int compareTo(Range i)
i - the ipublic double getAlphaFactor()
public void setAlphaFactor(double alphaFactor)
alphaFactor - the new alpha factorpublic boolean isEnd_inclu()
public void setEnd_inclu(boolean end_inclu)
end_inclu - the new end inclupublic boolean isStart_inclu()
public void setStart_inclu(boolean start_inclu)
start_inclu - the new start inclupublic double getLenght()
public void setMinimumSize(Percept v)
v - the new minimum sizepublic double getDistanceFromNearestLimit(double d)
d - : value used to compute distance.public boolean getNearestLimit(double d)
d - the dpublic double getStart()
public double getEnd()
public double getValue()
public void setValue(double value)
value - the new valuepublic boolean isPerceptEnum()
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparable