Crate puanrs

source ·
Expand description

Puan rust

Puan algorithms implemented in Rust.

Modules

Linalg functions
Simplex solver

Structs

Data structure for representing an at least constraint on form $$ c * v_0 + c * v_1 + … + c * v_n + bias \ge 0 $$ where $c \in [-1,1]$ depending on positive or negative bias. ids vector property holds what variables are connected to this constraint.
Data structure for linear inequalities on the following form $$ c_0 * v_0 + c_1 * v_1 + … + c_n * v_n + bias \ge 0 $$ for $ c \in $ coeffs and $ v $ are variables which can take on the values given by bounds. Indices represents the global indices of the variables. Note that the length of coeffs, bounds and indices must be the same.
A Statement is a declaration of an expression (or proposition) connected to a Variable. For instance, “A is true iff x > 3, else false” is a statement. Currently only AtLeast is considered to be an Expression.
A Theory is a list of statements with a common name (id).
Variable data structure has two properties, “id” and “bounds”. An instance of Variable is used to reference to Statement or an input into a Theory.