/// <summary>
 /// Initialization of derivation calculation functions
 /// </summary>
 public static void InitDeri()
 {
     functionDerivations = new ObjectFormulaTree[formStrings.Length];
     for (int i = 0; i < formStrings.Length; i++)
     {
         MathFormula f = MathFormula.FromString(MAX_SIZES, formStrings[i]);
         functionDerivations[i] = ObjectFormulaTree.CreateTree(f.FullTransform(null));
     }
 }
Exemplo n.º 2
0
        MathFormula IFormulaSaver.Load(string str)
        {
            MathFormula f = null;

            try
            {
                return(saver.Load(str));
            }
            catch (Exception ex)
            {
            }
            try
            {
                f = new MathFormula(0, MathSymbolFactory.Sizes, str, 0, str.Length,
                                    ElementaryFormulaStringConverter.Object);
                ObjectFormulaTree.CreateTree(f.FullTransform(null));
                return(f);
            }
            catch (Exception)
            {
                List <byte[]> list = new List <byte[]>();
                for (int i = 0; i < str.Length; i++)
                {
                    char   c = str[i];
                    byte[] b = new byte[] { (byte)c };
                    list.Add(b);
                }
                try
                {
                    MathFormula fo = new MathFormula(0, MathSymbolFactory.Sizes, list, 0, str.Length);
                    return(fo);
                }
                catch (Exception ex)
                {
                }
            }
            return(null);
        }