|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.cpsolver.studentsct.filter.RandomStudentFilter
public class RandomStudentFilter
This student filter accepts every student with the given probability. The choice for each student is remembered, i.e., if the student is passed to the filter multiple times the same answer is returned.
Constructor Summary | |
---|---|
RandomStudentFilter(double prob)
Constructor |
Method Summary | |
---|---|
boolean |
accept(Student student)
A student is accepted with the given probability |
void |
setProbability(double prob)
Set acceptance probability. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RandomStudentFilter(double prob)
prob
- probability of acceptance of a studentMethod Detail |
---|
public boolean accept(Student student)
accept
in interface StudentFilter
public void setProbability(double prob)
prob
- new acceptance probability
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |