Execute() public abstract method

public abstract Execute ( double>.Dictionary variables ) : double
variables double>.Dictionary
return double
Esempio n. 1
0
 public RawExpression Simplify()
 {
     try
     {
         return(new NumberExpression
         {
             Number = Execute(new Dictionary <string, double>()),
         });
     }
     catch (KeyNotFoundException)
     {
         RawExpression s = SimplifyInternal();
         try
         {
             return(new NumberExpression
             {
                 Number = s.Execute(new Dictionary <string, double>()),
             });
         }
         catch (KeyNotFoundException)
         {
             return(s);
         }
     }
 }
 public static double Solve(this RawExpression f, RawExpression df, string name, double start, int maxCount = 1000)
 {
     return Solve((x) => f.Execute(name, x), (x) => df.Execute(name, x), start, maxCount);
 }
Esempio n. 3
0
 public static double Execute(this RawExpression e, string name, double value)
 {
     return(e.Execute(new Dictionary <string, double> {
         { name, value }
     }));
 }
Esempio n. 4
0
 public static double Solve(this RawExpression f, RawExpression df, string name, double start, int maxCount = 1000)
 {
     return(Solve((x) => f.Execute(name, x), (x) => df.Execute(name, x), start, maxCount));
 }