Skip to content

zengzhuozhen/constrain-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

constrain-system

constrain-system by SICP

overview

implement basic mathematics:

  • addition
  • subtraction
  • multiplication
  • division
  • square
  • sqrt

and multivariate equation

How-to-Use

Use functional expression to represent

9C = 5(F-32)

like this:

C, F := Variable("c"), Variable("f")
Multiplication(
    Params(Constant(9), C),   // left
    Params(Constant(5),Addition(Params(Intermediate()), Params(F, Constant(-32))).GetIntermediate())) // right
)

tips:

expr.GetVariable("a") // can't get variable in superior expr when target variable in inferior expr,
but can predefined the variable and then inject into expr 
Inner Structure

img.png

About

constrain-system by SICP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages