|
||||||||||
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.FixedWeighing<E>
E
- The selection type.public class FixedWeighing<E>
Apply a fixed weighing to a list of elements.
Constructor Summary | |
---|---|
FixedWeighing()
Create a new instance with the default weighing value of 0.0 . |
|
FixedWeighing(double weight)
Create a new instance with the provided value for weighing. |
|
FixedWeighing(FixedWeighing<E> copy)
Create a copy of the provided instance. |
Method Summary | |
---|---|
FixedWeighing<E> |
getClone()
Create a cloned copy of the current object and return it. |
double |
getWeight()
Get the weight value. |
void |
setWeight(double weight)
Set the weight 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 FixedWeighing()
0.0
.
public FixedWeighing(double weight)
weight
- The weighing value to use.public FixedWeighing(FixedWeighing<E> copy)
copy
- The instance to copy.Method Detail |
---|
public FixedWeighing<E> getClone()
getClone
in interface Cloneable
getClone
in interface Weighing<E>
Object.clone()
public void setWeight(double weight)
weight
- The value to set.public double getWeight()
public boolean weigh(List<Selection.Entry<E>> elements)
elements
.
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 |