Warning: session_start(): open(/var/lib/php/sessions/sess_c0pa51golgut6mbu5vfioakahf, 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
// assigns probability pStart for first element, pEnd for last element // (rest linearly interpolated) static void probabilisticForEach(IProbabilisticScheduler scheduler, double pStart, double pEnd, Cl l, IF1 f) { if (scheduler == null || f == null) ret; probabilisticForEach(scheduler, pStart, pEnd, iterator(l), 0, l(l), 1.0, f); } static void probabilisticForEach(IProbabilisticScheduler scheduler, double pStart, double pEnd, Iterator it, int i, int n, double myProb, IF1 f) { assertTrue(pEnd <= pStart); if (scheduler == null || f == null || !it.hasNext()) ret; // get element A a = it.next(); // calculate probability for element double p = blend(pStart, pEnd, doubleRatio(i, n-1)); // run client function scheduler.at(f.get(a)); // schedule next element at lower probability scheduler.atRelative(doubleRatio(p, myProb), -> probabilisticForEach(scheduler, pStart, pEnd, it, i+1, n, p) }