private ExpressionSearch InitSearch() { char d = (char)(this.digit + '0'); ExpressionSearch search = new ExpressionSearch() { NumeralCount = this.digit }; search.AddOperator("+"); search.AddOperator("-"); search.AddOperator("*"); search.AddOperator("/"); search.AddOperator("^"); search.AddOperator("!"); search.AddOperator("R"); for (int i = this.digit; i > 0; --i) { string op = new string(d, i); search.AddOperand(op); } search.AddOperand("." + d); search.AddOperand("." + d + "_"); return(search); }
public Algorithm(params string[] args) { this.digit = GetDigit(args); this.min = GetMin(args); this.max = GetMax(args); this.search = this.InitSearch(); }