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

com.github.k0zka.finder4j.backtrack.ParallelTrack Maven / Gradle / Ivy

There is a newer version: 0.7
Show newest version
package com.github.k0zka.finder4j.backtrack;

/**
 * Interface to help the backtrack algorithm run several threads in parallel.
 * 
 * @param 
 *            state type
 * @param 
 *            step type
 */
public interface ParallelTrack> {
	/**
	 * Should return true if there is any free computation resource available.
	 * 
	 * @return
	 */
	boolean available();

	/**
	 * Run the search starting from a state.
	 * 
	 * @param state
	 *            starting state of the search thread
	 * @param stepFactory
	 *            steps factory
	 * @param terminationStrategy
	 *            termination strategy
	 * @param listener
	 *            solution listener
	 */
	void start(final X state, final StepFactory stepFactory,
			final TerminationStrategy terminationStrategy,
			final SolutionListener listener);

	/**
	 * Join all the started processes.
	 */
	void join();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy