package ec.gp.semantic.geometry;

import ec.*;
import ec.gp.*;

public interface IGeometryProvider {

	/**
	 * Semantically combines the behavior of parent1 with behavior of parent2 using random tree.
	 * 
	 * @param parent1
	 * @param parent2
	 * @param randomTree
	 * @return
	 */
	GPNode combine(EvolutionState state, GPNode parent1, GPNode parent2, GPNode randomTree);

	/**
	 * Semantically combines the behavior of parents using random trees. Number of random trees should be
	 * ceil(log2(parents))
	 * @param state
	 * @param parents
	 * @param randomTrees
	 * @return
	 */
	GPNode combine(EvolutionState state, GPNode[] parents, GPNode[] randomTrees);

	/**
	 * Semantically combines the behavior of parent with behavior of expression (random1 - random2).
	 * 
	 * @param state
	 * @param parent
	 * @param random1
	 * @param random2
	 * @return
	 */
	GPNode differencingCombine(EvolutionState state, GPNode parent, GPNode random1, GPNode random2);

}
