Warning: session_start(): open(/var/lib/php/sessions/sess_ua6mh5sjv980hnb5p8lhtcbv1t, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
// always keeps a dynamically updated list of the n most probable
// results
// not synchronized
sclass SetOfMostProbable extends TreeSetWithDuplicates> {
int maxSize = 10;
*() {}
*(int *maxSize) {}
public bool add(WithProbability a) {
if (a == null) false;
super.add(a);
truncate();
true;
}
void setMaxSize(int maxSize) {
this.maxSize = maxSize;
truncate();
}
void truncate {
truncateTreeSetWithDuplicates(this, maxSize);
}
}