stat
Class ParamTendenciesStat
java.lang.Object
stat.Stat
stat.ParamTendenciesStat
- All Implemented Interfaces:
- MoreMath.Comparer, java.lang.Runnable
- public class ParamTendenciesStat
- extends Stat
- implements java.lang.Runnable, MoreMath.Comparer
Saves a parameter set with the minimum and maximum values set to encompass the most
common values for each parameter in all the loaded sets. The statistic uses the following
algorithm to find those ranges: First it sorts all the values for a parameter from all
the parameter sets from lowest to highest. Then it finds the the position that is
proportionIncluded along the list (for instance, if proportionIncluded is 0.5 and
there are 100 parameter sets then it finds the value at position 50). It stores the ratio
of the value at this position divided by the value at position 1. It then moves up one
position, and finds the ratio between the two values starting at the new position (ratio
of position 51 to position 2 in example). It keeps going till it reaches the end of the
list, always storing the smallest ratio found. It then saves out a minimum and maximum
corresponding to where that smallest ratio was found - this min and max will then encompass
the most concentrated proportionIncluded of the values in the set. If the smallest ratio was
below minRestriction, it saves out a minimum value at the minimum value found for the lowest ratio,
but a maximum value that is minRestriction times that minimum value (thus, the range is never
less than minRestriction). If the smallest ratio is more than maxRestriction, it saves
out the full original range with no restriction.
Blech. It might be easier just to read the code. This needs some work, anyway.
Method Summary |
void |
calculateStat()
|
int |
compare(java.lang.Object a,
java.lang.Object b)
The interface implementation should compare the two
* objects and return an int using these rules:
* if (a > b) return > 0;
* if (a == b) return 0;
* if (a < b) return < 0; |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.Runnable |
run |
ParamTendenciesStat
public ParamTendenciesStat()
calculateStat
public void calculateStat()
- Overrides:
calculateStat
in class Stat
compare
public int compare(java.lang.Object a,
java.lang.Object b)
- Description copied from interface:
MoreMath.Comparer
- The interface implementation should compare the two
* objects and return an int using these rules:
* if (a > b) return > 0;
* if (a == b) return 0;
* if (a < b) return < 0;
- Specified by:
compare
in interface MoreMath.Comparer