/// <summary> /// Initializes a new instance of the <see cref="AlgorithmBase"/> class. /// </summary> /// <param name="parameters"> /// The parameters. /// </param> public AlgorithmBase(Input parameters) : base(parameters) { threshold = ThresholdFactory.Make(parameters.ThresholdMethod, parameters); criterion = CriterionFactory.Make(parameters.StopCriterion, threshold, parameters); extractor = WordExtractorFactory.GetSeeker(parameters.Seeker); balance = parameters.Balance; windowLen = parameters.WindowLength; windowDec = parameters.WindowDecrement; }
/// <summary> /// The make. /// </summary> /// <param name="index"> /// The index. /// </param> /// <param name="input"> /// The input. /// </param> /// <returns> /// The <see cref="Algorithm"/>. /// </returns> public static Algorithm Make(int index, Input input) { switch (index) { case 0: return new AlgorithmBase(input); case 1: return null; default: throw new ArgumentException("Unknown index", "index"); } }
/// <summary> /// Initializes a new instance of the <see cref="Algorithm"/> class. /// </summary> /// <param name="input"> /// The input. /// </param> public Algorithm(Input input) { inputs.Add(input); }