Exemplo n.º 1
0
    change($scale, 5);
    for ($i = 0; $i < $n - 1; $i++) {
        if ($dests->at($i)->value != $i * 5 + 1000) {
            alert("Projection 3 failed");
        }
    }
    change($offset, 2000);
    for ($i = 0; $i < $n - 1; $i++) {
        if ($dests->at($i)->value != $i * 5 + 2000) {
            alert("Projection 4 failed");
        }
    }
}
function change($v, $newValue)
{
    global $planner;
    $edit = new EditConstraint($v, Strength::Preferred());
    $edits = new OrderedCollection();
    $edits->add($edit);
    $plan = $planner->extractPlanFromConstraints($edits);
    for ($i = 0; $i < 10; $i++) {
        $v->value = $newValue;
        $plan->execute();
    }
    $edit->destroyConstraint();
}
$deltaBlue = function () {
    chainTest(100);
    projectionTest(100);
};
$DeltaBlue = new BenchmarkSuite('DeltaBlue', [66118], array(new Benchmark('DeltaBlue', true, false, 4400, $deltaBlue)));
Exemplo n.º 2
0
function deltaBlue()
{
    chainTest(100);
    projectionTest(100);
}