JuliaAlgebra / DynamicPolynomials.jl

Multivariate polynomials implementation of commutative and non-commutative variables
Other
60 stars 21 forks source link

Add default evaluations routines which assume default variable ordering #24

Closed saschatimme closed 6 years ago

saschatimme commented 6 years ago

If I have to evaluate DynamicPolynomials in 99% of my cases I end up doing

f(MP.variables(f)=>x)

This PR adds more callable cases to support

f(1, 2) # fallback  to  f(MP.variables(f)=>(1, 2))
f((1, 2))  # fallback  to  f(MP.variables(f)=>(1, 2))
f([1, 2])  # fallback  to  f(MP.variables(f)=>[1, 2])

I don't think that this leads to substantially more confusion than the current requirement to always explicitly provide the variables.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.01%) to 99.042% when pulling 9604269c846364b19ea6e60223d0353fb7f9db43 on evaluation into 1e290d0db657150f2656dcf1c38ce532bbe13864 on master.

codecov-io commented 6 years ago

Codecov Report

Merging #24 into master will increase coverage by 0.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #24      +/-   ##
==========================================
+ Coverage   99.02%   99.04%   +0.01%     
==========================================
  Files          15       15              
  Lines         721      731      +10     
==========================================
+ Hits          714      724      +10     
  Misses          7        7
Impacted Files Coverage Δ
src/subs.jl 98.36% <100%> (+0.32%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1e290d0...9604269. Read the comment docs.