Crate geqslib

Crate geqslib 

Source

Modules§

errors
Contains error types for different errors that this crate may throw.
ffi
Contains extern "C" function definitions for linking this library against projects in different languages. Not intended for use in other Rust projects.
newton
Contains root-finding algorithms for building equation-solving tools.
shunting
Contains a basic shunting yard algorithm for evaluating strings as mathematical expressions.
system
Contains functions for checking whether systems or equations are properly constrained for solving.
variable
Contains the Variable type for numbers that exist on a user-specified domain.

Functions§

solve_equation_from_str
Solves an equation given as a string for a SINGLE unknown variable. This function infers the unknown variable from the given expression, using a new default ContextHashMap to account for common constants and functions.
solve_equation_with_context
Solves an equation given as a string for the SINGLE unknown that is inferred based on the context and the given equation string. The given context must contain all known symbols in the equation but NOT the variable that is to be solved for. E.g. the context for "x + sin(y) = 9" must define a value for "y" and "sin", but NO value for "x" if "x" is the variable to be solved for.