funkoff library

Functions

astParser(String formula) String
Returns which type of function is being fed in as a string.
computeCube(String formula, double value) double
Computes Y from a given X and function formula and returns it as a double for cubic functions.
computeCubeSet(String formula, List<double> values) List<double>
Computes Ys from a given Xs and function formula and returns it as a List of doubles for cubic functions.
computeLinear(String formula, double value) double
Computes Y from a given X and function formula and returns it as a double for linear functions.
computeLinearSet(String formula, List<double> values) List<double>
Computes Ys from a given Xs and function formula and returns it as a List of doubles for linear functions.
computeQuadratic(String formula, double value) double
Computes Y from a given X and function formula and returns it as a double for quadratic functions.
computeQuadraticSet(String formula, List<double> values) List<double>
Computes Ys from a given Xs and function formula and returns it as a List of doubles for quadratic functions.
cosmeticStatements() Map<String, dynamic>
Returns a map of the non-essential parser elements.
engineAST() Map<String, dynamic>
This method returns the AST patterns needed for matching formulas.
enginePatterns() Map<String, dynamic>
This method returns the lexing patterns needed for matching formulas.
irParser(String formula) List<double>
Returns a list of double values, containing, a,b, and c, if present.
makeVisualTree(String formula) → void
This function logs a visual tree of the formula to the console.
patternParser(String formula) List
Generates a list of the schema TOKEN_TYPE, TOKEN and returns it.
statementLinter(String formula) bool
Returns a Boolean value of whether the formula fed-in, is valid.
testCubes() → void
Tests the above methods for cubic functions.
testEngine() → void
Tests the functions above.
testLinears() → void
Tests the above methods for linear functions.
testQuadratics() → void
Tests the above methods for quadratic functions.