Note that there are some explanatory texts on larger screens.

plurals
  1. POJava formula evaluation library with out-of-order variables feature
    text
    copied!<p>I'm currently looking for a java library (or native library with a java API) for formula parsing and evaluation.</p> <p>Using recommandations from here, I took a look on many libraries :</p> <ul> <li>JFormula</li> <li>JEval</li> <li>Symja</li> <li>JEP</li> </ul> <p>But none of them fulfil my needs, that are :</p> <ul> <li>Multiple formula evaluation with dependency between them (a formula is always an affectation to a variable using other variables or numerical values)</li> <li>Possibility to change only one formula out of maybe 50, with good performances if only one formule changes</li> <li>no need to handle by hand variables dependancies</li> <li>Automatically update other dependant variables if a formula changes</li> <li>Possibility to listen which variable changed</li> <li>no need to have a specific format for the variables (the user will directly enter a name and doesn't want to have a complexe notation)</li> </ul> <p>Maybe an exemple will be better. Let's say we have, entered in the system in this order :</p> <ul> <li>a = b + c</li> <li>c = 2 * d</li> <li>b = 3</li> <li>d = 2</li> </ul> <p>I would like to be able to enter those 4 lines in this order, and ask for the result of "a" (or "b", whatever). Then if in the user interface (basically a table variable &lt;> formula) "b" is changed to "2 * d", the library will automatically change the value of "b" and "a", and return me (or lunch an event, or call a function) a list of changes </p> <p>The best library would be one just like JEP, but with the out-of-order variables capability and the possibility to auto-evaluate dependant variables</p> <p>I know that compilers and spreadsheet softwares uses such mechanisms, but I didn't found any java or java compatible libraries directly usable</p> <p>Does someone know one?</p> <p>EDIT : Precision : the question is really about a library, or eventually a set of libraries to link together. The question is for a project in a company and the idea is to spend the minimum amount of time. The "do it yourself" solution has already been estimated and is not in the scope of the question</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload