private Variable ExecuteAll(Variable v1, Variable v2) { Variable v = new Variable(); v.FactorName = v1.FactorName.Concat(v2.FactorName).ToList(); int v1max = v1.Factors.Count(); int v2max = v2.Factors.Count(); for (int i = 0; i < v1max; ++i) { var v1l = v1.Factors[i]; for (var j = 0; j < v2max; ++j) { var v2l = v2.Factors[j]; var vl = v1l.Concat(v2l).ToList(); v.Factors.Add(vl); } } return v; }
private Variable ExecutePlus(Variable v1, Variable v2) { Variable v = new Variable(); v.FactorName = v1.FactorName.Concat(v2.FactorName).ToList(); int v1max = v1.Factors.Count(); int v2max = v2.Factors.Count(); int vmax = Math.Max(v1max, v2max); for (int i = 0; i < vmax; ++i) { var v1l = v1.Factors[i % v1max]; var v2l = v2.Factors[i % v2max]; var vl = v1l.Concat(v2l).ToList(); v.Factors.Add(vl); } return v; }
private Variable Parse(Parser.Exp.IDVal idExp, Declarations declaration) { string factorName = idExp.Item; Variable v = new Variable(); v.FactorName.Add(factorName); var fs = declaration[factorName]; foreach (var f in fs) { var fac = new List<string>(); fac.Add(f); v.Factors.Add(fac); } return v; }
public TestCase(Variable result) { // TODO: Complete member initialization this.result = result; }