All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.btrplace.scheduler.runner.disjoint.model.IterateProcedure Maven / Gradle / Ivy

Go to download

Instance solvers that split a single problem into smaller parts to solve them in parallel.

There is a newer version: 1.9.3
Show newest version
/*
 * Copyright  2020 The BtrPlace Authors. All rights reserved.
 * Use of this source code is governed by a LGPL-style
 * license that can be found in the LICENSE.txt file.
 */

package org.btrplace.scheduler.runner.disjoint.model;

import org.btrplace.model.Element;

/**
 * A procedure to use on a set of contiguous elements that
 * belong to the same partition.
 *
 * @author Fabien Hermenier
 */
@FunctionalInterface
public interface IterateProcedure {

    /**
     * The method to execute.
     *
     * @param index the splittable set to rely on
     * @param key   the partition key
     * @param from  the value lower bound
     * @param to    the value upper bound (exclusive)
     * @return {@code true} to continue
     */
    boolean extract(SplittableElementSet index, int key, int from, int to);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy