/// <summary> /// Returns a compiled expression /// Allows to boost substitution a lot /// </summary> /// <param name="func"></param> /// <param name="variables"> /// Must be equal to func's variables (ignoring constants) /// </param> /// <returns></returns> internal static FastExpression Compile(Entity func, params VariableEntity[] variables) { var strings = new List <string>(); foreach (var varEnt in variables) { if (!MathS.IsConstant(varEnt)) { strings.Add(varEnt.Name); } } return(Compile(func, strings.ToArray())); }