/**
 * Copyright (c) 2012-2013, Daniele Codecasa <codecasa.job@gmail.com>,
 * Models and Algorithms for Data & Text Mining (MAD) laboratory of
 * Milano-Bicocca University, and all the CTBNCToolkit contributors
 * that will follow.
 * All rights reserved.
 *
 * @author Daniele Codecasa and all the CTBNCToolkit contributors that will follow.
 * @copyright 2012-2013 Daniele Codecasa, MAD laboratory, and all the CTBNCToolkit contributors that will follow
 */
package CTBNCToolkit.tests;

import CTBNCToolkit.*;

/**
 * @author Daniele Codecasa <danielecdcs@gmail.com>
 *
 * Factory interface to generate new model instances.
 * 
 * @param <TM> type of model generated by the factory
 * @param <TimeType> type of the time interval (Integer = discrete time, Double = continuous time)
 * @param <NodeType> type of node in the model
 */
public interface IModelFactory<TM extends IModel<TimeType, NodeType>, TimeType extends Number & Comparable<TimeType>, NodeType extends INode> {

	/**
	 * Get the name used to name the models
	 * generated.
	 * 
	 * @return name of the factory
	 */
	public String getModelsName();
	
	/**
	 * Generate a new model instance.
	 * 
	 * @return return a new model instance
	 */
	public TM newInstance();
	
	/**
	 * Generate a new model instance.
	 * 
	 * @param name name of the new instance
	 * @return return a new model instance
	 */
	public TM newInstance(String name);
	
	/**
	 * Return the suggested trajectory length
	 * to have reasonable experiments respect
	 * the lambda factors.
	 *  
	 * @return suggested trajectory length for dataset generation
	 */
	public double getTrajectoryLength();
	
	
	/**
	 * Set the trajectory length suggestion
	 * for sampling a trajectory with
	 * a model generated by this factory.
	 * 
	 * @param trjLength trajectory length to suggest during the trajectory sampling
	 * @throws IllegalArgumentException in case of illegal parameters
	 */
	public void setTrajectoryLength( double trjLength) throws IllegalArgumentException;
	
}
