package de.ugoe.cs.eventbench.commands;

import java.util.List;
import java.util.Random;

import de.ugoe.cs.eventbench.models.DeterministicFiniteAutomaton;
import de.ugoe.cs.eventbench.models.TrieBasedModel;
import de.ugoe.cs.util.console.Console;

/**
 * <p>
 * Command to train a Deterministic Finite Automaton (DFA).
 * </p>
 * 
 * @author Steffen Herbold
 * @version 2.0
 */
public class CMDtrainDFA extends AbstractTrainCommand {

	/*
	 * (non-Javadoc)
	 * 
	 * @see de.ugoe.cs.util.console.Command#help()
	 */
	@Override
	public void help() {
		Console.println("Usage: trainDFA <modelName> <sequencesName>");
	}

	/**
	 * <p>
	 * No additional parameters.
	 * </p>
	 * 
	 * @see de.ugoe.cs.eventbench.commands.AbstractTrainCommand#handleAdditionalParameters(java.util.List)
	 */
	@Override
	void handleAdditionalParameters(List<Object> parameters) throws Exception {
		// no additional parameters.
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see de.ugoe.cs.eventbench.commands.AbstractTrainCommand#createModel()
	 */
	@Override
	TrieBasedModel createModel() {
		return new DeterministicFiniteAutomaton(new Random());
	}

}
