https://github.com/a-poor/formulae.jl
Create dynamic formulae using Variables, Constants, and Operators.
https://github.com/a-poor/formulae.jl
equation formula graph julia julia-package
Last synced: about 1 year ago
JSON representation
Create dynamic formulae using Variables, Constants, and Operators.
- Host: GitHub
- URL: https://github.com/a-poor/formulae.jl
- Owner: a-poor
- Created: 2021-05-16T17:01:26.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-16T18:09:56.000Z (about 5 years ago)
- Last Synced: 2025-03-26T06:35:57.977Z (over 1 year ago)
- Topics: equation, formula, graph, julia, julia-package
- Language: Julia
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Formulae.jl
_created by Austin Poor_
Create dynamic formulae using `Variables`, `Constants`, and `Operators`.
Here's a quick example:
```julia
julia> using Formulae
julia> x = Variable("x", 10)
{x=10}
julia> y = Variable("y", 3)
{y=3}
julia> f = x * (y + 2)
{{x=10} {*} {{y=3} {+} {2}}}
julia> getval(x), getval(y), getval(f)
(10, 3, 50)
julia> x.value = 5
5
julia> getval(x), getval(y), getval(f)
(5, 3, 25)
julia> update!(f, Dict("x"=>2,"y"=>4))
julia> getval(x), getval(y), getval(f)
(2, 4, 12)
```