|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.util.selection.weighing.LinearWeighing<E>
E
- The selection type.public class LinearWeighing<E>
Apply a weighting to the provided list of elements. This weighting will be linear with the bounds of the range set to [0,1] in the default case.
Constructor Summary | |
---|---|
LinearWeighing()
Create a new instance with the bounds of [0,1]. |
|
LinearWeighing(double min,
double max)
Create a new instance with the linear bounds of [min, max] . |
|
LinearWeighing(LinearWeighing<E> copy)
Create a copy of the provided instance. |
Method Summary | |
---|---|
LinearWeighing<E> |
getClone()
Create a cloned copy of the current object and return it. |
double |
getMax()
Get the maximum bound value. |
double |
getMin()
Get the minimum bound value. |
void |
setMax(double max)
Set the maximum bound value. |
void |
setMin(double min)
Set the minimum bound value. |
boolean |
weigh(List<Selection.Entry<E>> elements)
Perform a weighing on the provided list of entries. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinearWeighing()
public LinearWeighing(double min, double max)
[min, max]
.
min
- The lower bound.max
- The upper bound.public LinearWeighing(LinearWeighing<E> copy)
copy
- The instance to copy.Method Detail |
---|
public LinearWeighing<E> getClone()
getClone
in interface Cloneable
getClone
in interface Weighing<E>
Object.clone()
public void setMin(double min)
min
- The value to set.public double getMin()
public void setMax(double max)
max
- The value to set.public double getMax()
public boolean weigh(List<Selection.Entry<E>> elements)
[min, max]
.
weigh
in interface Weighing<E>
elements
- The entries to weigh.
true
if successful, false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |