My Calculus tool is coming along. The only thing left is to write some it's helper functions, such as the one described below:(adsbygoogle = window.adsbygoogle || []).push({});

which usesCode (Text):

void CalculusWizard::partitionEquation(const std::string & eq, std::string & eq1, std::string & eq2, CalcWizConsts::eqOps & oper)

{

/* Given an equation eq, partion eq into

eq = eq1 oper eq2

where oper is the operator with the lowest precedence,

e.g. eq = "x*sin(x)+x^2" --> eq1 = "x*sin(x)", oper = ADDITION, eq2 = "x^2".

If there is no operator, e.g. eq = "x", then oper = NONE.

*/

}

defined inCode (Text):

enum eqOps { ADDITION, SUBTRACTION, MULTIPLICATION, DIVISION, COMPOSITION, NONE };

Does anyone have advice for how I should start out on this function? Or is there any resource you could direct me to where I could learn this type of thing?Code (Text):

namespace CalcWizConsts.

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Algorithm to partition a complex equation into 2 master equations

Loading...

Similar Threads - Algorithm partition complex | Date |
---|---|

C/++/# Is there a flaw in my longest common subsequence algorithm? | Feb 24, 2018 |

C/++/# Finding duplicates algorithm | Jan 20, 2018 |

Perceptron algorithm initial vector | Dec 28, 2017 |

C/++/# What should I be most familiar w/for C++ Data Structs & Algorithms | Dec 1, 2017 |

C/++/# Finding all the "move combinations" to partition an array | Jul 31, 2016 |

**Physics Forums - The Fusion of Science and Community**